Property Change Notification

A key aspect of MVVM related to data binding is property change notification. Property change notification allows a source object (for example, a viewmodel) to signal to a target FrameworkElement that a value needs updating in the UI.

There are two ways to implement change notification in a source class: either using dependency properties or by implementing the INotifyPropertyChanged interface, which is often referred to as just INPC.

Note

The use of dependency properties is not recommended for viewmodels because it requires that the viewmodel class inherit from DependencyObject and that all property updates occur on the UI thread. This can lead to a lot of thread-related plumbing code in the viewmodel and makes ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.