INotifyPropertyChanged Interface

Definition

Notifies clients that a property value has changed.

public interface class INotifyPropertyChanged
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2427549185, 45157, 22638, 131, 217, 154, 220, 58, 105, 82, 132)]
struct INotifyPropertyChanged
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.Guid(2427549185, 45157, 22638, 131, 217, 154, 220, 58, 105, 82, 132)]
public interface INotifyPropertyChanged
Public Interface INotifyPropertyChanged
Derived
Attributes

Remarks

When programming with .NET, 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 Microsoft 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.

Events

PropertyChanged

Occurs when a property value changes.

Applies to

See also