INotifyPropertyChanged |
Binding objects to the UI is a large and tedious task. You must implement INotifyPropertyChanged on every property that needs to be bound. You need to ensure that the underlying property setter correctly raises events so that the View knows that changes have occurred. The larger your codebase, the more work there is. You can partially eliminate all of this repetitive code by pushing some of the functionality to a base class that each Model class inherits from. It still doesn't eliminate all of the repetition though.
PostSharp can completely eliminate all of that repetition for you. All you have to do is make use of the Model Pattern Library's NotifyPropertyChangedAttribute aspect.

Topic | Description |
---|---|
Walkthrough: Automatically Implementing INotifyPropertyChanged | This section shows how to automatically implement the INotifyPropertyChanged interface in a class thanks to the NotifyPropertyChangedAttribute aspect. |
Walkthrough: Working with Properties that Depend on Other Objects | This section describes how to handle dependencies that cross several objects, as when a view-model object is dependent on properties of a model object. |
This section documents how to implement the INotifyPropertyChanging interface for components which need to be signalled before a property value is changed. | |
This section shows examples of using the NotifyPropertyChangedAttribute aspect with some of the popular UI frameworks. | |
This section documents how to cope with the cases that cannot be automatically handled by the NotifyPropertyChangedAttribute aspect. | |
This section describes the principles and concepts on which the NotifyPropertyChangedAttribute aspect relies. | |
This section shows how to prevent notifications when the property value does not actually change. |