INotifyPropertyChanged interface

Applies to Windows and Windows Phone

Notifies clients that a property value has changed.

.NET:  This interface appears as System.ComponentModel.INotifyPropertyChanged.

Syntax


public interface class INotifyPropertyChanged

Attributes

[Version(0x06020000)]
[WebHostHidden()]

Members

The INotifyPropertyChanged interface inherits from the IUnknown interface. INotifyPropertyChanged also has these types of members:

Events

The INotifyPropertyChanged interface has these events.

EventDescription
PropertyChanged Occurs when a property value changes.

 

Remarks

When building Windows Store apps with the Microsoft .NET Framework, this interface is hidden and developers should use the System.ComponentModel.INotifyPropertyChanged interface.

The INotifyPropertyChanged interface is used to notify clients, typically binding clients, that a property value has changed. For example, consider an Employee object with a property called Name. To provide generic property-change notification, the Employee type implements the INotifyPropertyChanged interface and raises a PropertyChanged event when Name is changed.

The PropertyChanged event can indicate that all properties on the object have changed by using String.Empty for the PropertyName property of the PropertyChangedEventArgs. Note that you cannot use null (Nothing in Visual Basic) for this like you can in Windows Presentation Foundation (WPF) and Microsoft Silverlight.

The PropertyChanged event can indicate that indexer properties on the object have changed by using a PropertyName value of "Item[indexer]" for specific indexers or "Item[]" for all indexers. Note that C++ does not currently support binding to indexers. For a workaround, see the XAML data binding sample.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows::UI::Xaml::Data

Metadata

Windows.winmd

See also

Binding
XAML data binding sample
Data binding overview

 

 

Show:
© 2014 Microsoft