,

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 your code less portable because of dependence on the dependency property system.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.81.166