data binding without inotifypropertychanged image credit:

12
Data Binding Without INotifyPropertyChanged Image Credit:

Upload: brian-george

Post on 18-Jan-2018

233 views

Category:

Documents


0 download

DESCRIPTION

Michael L Perry Update Controls Correspondence Client App Dev

TRANSCRIPT

Page 1: Data Binding Without INotifyPropertyChanged Image Credit:

Data BindingWithout INotifyPropertyChanged

Image Credit:

Page 2: Data Binding Without INotifyPropertyChanged Image Credit:

Slides and Code• updatecontrols.net/doc/inpc

Page 3: Data Binding Without INotifyPropertyChanged Image Credit:

Michael L Perry• qedcode.com• @MichaelLPerry• Update Controls• Correspondence• Client App Dev

Page 4: Data Binding Without INotifyPropertyChanged Image Credit:

Dan Bricklin and Bob Frankston

Page 5: Data Binding Without INotifyPropertyChanged Image Credit:

y=1/(1+x2)

-3 -2 -1 0 1 2 30

0.2

0.4

0.6

0.8

1

1.2

Page 6: Data Binding Without INotifyPropertyChanged Image Credit:

Stateful View Models

PersonListViewModel PersonViewModelFirstNameLastNameFullName

Name Changed

Name Changed

Person Selected

Person Selected

PersonSummaryFullName

Page 7: Data Binding Without INotifyPropertyChanged Image Credit:

Stateless View Models

PersonListViewModel PersonViewModel

PersonList PersonFirstNameLastName

PersonSummary

NavigationSeletedPerson

Page 8: Data Binding Without INotifyPropertyChanged Image Credit:

IndependentDependent

Two Way Connection

**

Page 9: Data Binding Without INotifyPropertyChanged Image Credit:

UpdatingPersonViewModel

PersonView

Person(Model)

TextBlock get _firstName_lastName

FullName

DependentIndependent

Independent“FullName”

Page 10: Data Binding Without INotifyPropertyChanged Image Credit:

ModifyingPersonViewModel

PersonView

Person(Model)

TextBlock get _firstName_lastName

DependentIndependent

Independent

TextBox FirstName set

“FullName”

Page 11: Data Binding Without INotifyPropertyChanged Image Credit:

MVVM Idioms• Dependent Properties• Dual• Tuple• Navigation• Equals/GetHashCode• Command Binding

Page 12: Data Binding Without INotifyPropertyChanged Image Credit:

Michael L Perry• @MichaelLPerry• [email protected]• updatecontrols.codeplex.com• updatecontrols.net/doc/inpc