O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data Context Change Tracking

The dirty state of an entity is monitored by the data context. This is usually accomplished with change notifications, provided through the INotifyPropertyChanging.PropertyChanging and INotifyPropertyChanged.PropertyChanged events, raised in the property setters of the entity.

Combining the PropertyChanged and PropertyChanging events raising into every property setter can add up to a lot of plumbing code. Fortunately the Assign method, in the custom ViewModelBase class, used throughout this book, raises the events required for change tracking.

For more information on the property change notification, in relation to the ViewModelBase class, see Chapter 2.

For entities that do not implement INotifyPropertyChanging

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required