Dela via


ModelItem.PropertyChanged Event

When overridden in a derived class, occurs when a property on the model changes.

Namespace:  Microsoft.Windows.Design.Model
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public MustOverride Event PropertyChanged As PropertyChangedEventHandler
'Usage
Dim instance As ModelItem 
Dim handler As PropertyChangedEventHandler 

AddHandler instance.PropertyChanged, handler
public abstract event PropertyChangedEventHandler PropertyChanged
public:
virtual   event PropertyChangedEventHandler^ PropertyChanged {
    void add (PropertyChangedEventHandler^ value);
    void remove (PropertyChangedEventHandler^ value);
}
JScript does not support events.

Implements

INotifyPropertyChanged.PropertyChanged

Remarks

This event implements the INotifyPropertyChanged interface. This event can be used to tell when a property on the model changes. It is also useful because INotifyPropertyChanged can be used by the data binding features of Windows Presentation Foundation (WPF).

You should disconnect events from items when you are finished with them. Otherwise, you can prevent the item from being clean up during garbage collection.

.NET Framework Security

See Also

Reference

ModelItem Class

ModelItem Members

Microsoft.Windows.Design.Model Namespace

Other Resources

WPF Designer Extensibility Architecture