thinking in wpf

62
thinking in wpf ivan towlson mindscape

Upload: riva

Post on 24-Feb-2016

44 views

Category:

Documents


0 download

DESCRIPTION

thinking in wpf. ivan towlson mindscape. model is everything. string UserName. DateTime LastActive. bool IsModerator. model. view interface. view. string UserName. presenter. DateTime LastActive. bool IsModerator. model. don’t repeat yourself. view. string UserName. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: thinking in  wpf

thinking in wpf

ivan towlsonmindscape

Page 2: thinking in  wpf
Page 3: thinking in  wpf
Page 4: thinking in  wpf
Page 5: thinking in  wpf

model is everything

Page 6: thinking in  wpf

DateTime LastActive

string UserName

bool IsModerator

model

Page 7: thinking in  wpf

DateTime LastActive

string UserName

bool IsModerator

model

presenter

viewview interface

Page 8: thinking in  wpf

don’t repeat yourself

Page 9: thinking in  wpf

DateTime LastActive

string UserName

bool IsModerator

model

view

Page 10: thinking in  wpf

if i can’t data bind to it,it’s not my framework

with apologies to emma goldman

Page 11: thinking in  wpf

what is the work oflist boxes

in this framework?

with apologies to joel spolsky

Page 12: thinking in  wpf

what is the work ofcheck boxes

in this framework?

with apologies to joel spolsky

Page 13: thinking in  wpf

what is the work ofbuttons

in this framework?

with apologies to joel spolsky

Page 14: thinking in  wpf

what is the work ofcontrols

in this framework?

with apologies to joel spolsky

Page 15: thinking in  wpf

Behaviour

Page 16: thinking in  wpf

Behaviour

Content

Page 17: thinking in  wpf

Behaviour

Layout

Content

Page 18: thinking in  wpf

Stacked

Positioned

Tabular

None Selectablelist

Page 19: thinking in  wpf

Selectablelist

Text

Images

Composite with trigger

Page 20: thinking in  wpf

Selectablelist

Positioned

Images

Page 21: thinking in  wpf

today we would prefer not to havenaming of parts

Page 22: thinking in  wpf

about that of whichone cannot speak,one must be silent

with apologies to ludwig wittgenstein

Page 23: thinking in  wpf

how will clicky-ba know them?

with apologies to steve bell and the wolf of kabul

Page 24: thinking in  wpf

you can’t use an event there

Page 25: thinking in  wpf

you do not need a new control

except for a property grid, a tree list view and 11 others– you need those

Page 26: thinking in  wpf

timer is not missing

Page 27: thinking in  wpf

you can still sort list boxes

Page 28: thinking in  wpf

this is your brain on xaml

Page 29: thinking in  wpf

with apologies to talking heads

Page 30: thinking in  wpf

what is the value of adependency property?

Page 31: thinking in  wpf

it depends...

Page 32: thinking in  wpf

onthe default value

Page 33: thinking in  wpf

onthe value inherited from a parent

Page 34: thinking in  wpf

onthe value specified in a style

Page 35: thinking in  wpf

onthe value specified in a trigger

Page 36: thinking in  wpf

onthe value you put in there

Page 37: thinking in  wpf

onthe value of a data binding

Page 38: thinking in  wpf

onwhether the property is animated

Page 39: thinking in  wpf

onwhether the property is coerced

Page 40: thinking in  wpf

it depends

Page 41: thinking in  wpf

why is this text green?

and is this text green for the same reason?

Page 42: thinking in  wpf

why is this text green?

and is this text green for the same reason?

<TextBlock Foreground="{StaticResource QueryText}">

</TextBlock>

<TextBlock Foreground="{Binding IsInCredit, Converter=...}">

</TextBlock>

Page 43: thinking in  wpf

how did i get here?

Page 44: thinking in  wpf

<DockPanel>

</DockPanel>

<TextBlock DockPanel.Dock="Bottom">how did i get here?

Page 45: thinking in  wpf

where did this content come from?

Page 46: thinking in  wpf

where did this content come from?

QuoteAlbumTitle

<local:MisquotationConverter />

Page 47: thinking in  wpf

cupboards, not storyboards

Page 48: thinking in  wpf

building blocks

Page 49: thinking in  wpf

extensibility is like elvis:everywhere

Page 50: thinking in  wpf

accessing a property from codeis an admission of defeat

Page 51: thinking in  wpf

accessing a control from codeis an admission of defeat

Page 52: thinking in  wpf

string UserName

model

viewtextBox1.Text = member.UserName;

member.UserName = textBox1.Text;

textBox1.TextChanged += UpdateUserName;

Page 53: thinking in  wpf

string UserName

model

viewtextBox1.Text = member.UserName;

member.UserName = textBox1.Text;

textBox1.TextChanged += UpdateUserName;

code smellalert!

Page 54: thinking in  wpf

string UserName

model

view

Page 55: thinking in  wpf

DateTime LastActive

string UserName

bool IsModerator

model

view

Page 56: thinking in  wpf

building blocks

Page 57: thinking in  wpf

ConvertersSelectorsTriggersLookless

controls

StylesTemplatesBindings

Events / comman

ds

Page 58: thinking in  wpf

the littlest birdssing the prettiest songs

with apologies to the be good tanyas

Page 59: thinking in  wpf
Page 60: thinking in  wpf
Page 61: thinking in  wpf
Page 62: thinking in  wpf

thanks

[email protected]

[email protected]/flatlander