INotifyPropertyChanged interface

Expand
This topic has not yet been rated - Rate this topic

INotifyPropertyChanged interface

[This documentation is preliminary and is subject to change.]

Notifies clients that a property value has changed.

Syntax


public interface INotifyPropertyChanged

Attributes

GuidAttribute("cf75d69c-f2f4-486b-b302-bb4c09baebfa")
VersionAttribute(NTDDI_WIN8)
WebHostHiddenAttribute()

Members

The INotifyPropertyChanged interface has these types of members:

Events

The INotifyPropertyChanged interface has these events.

EventDescription
PropertyChanged Occurs when a property value changes.

 

Remarks

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 Data Binding sample.

Requirements

Minimum supported client

Windows 8 Release Preview

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml.Data
Windows::UI::Xaml::Data [C++]

Metadata

Windows.winmd

See also

Binding
Data Binding sample
Data binding with XAML

 

 

Build date: 5/22/2012

Did you find this helpful?
(1500 characters remaining)
Community Additions ADD
INotifyPropertyChanged
The System.Componentmodel namespace is not available in the WinRT assembly and is now exposed via Windows.UI.Xaml.Data. The functional intent is the same but remember that Metro apps only have access to a subset of the full CRT gamut.
10/29/2011
Why is INotifyPropertyChanged exist in two different namespaces?
The exact same interface is already exists in System.ComponentModel. Why create two different interfaces?
10/7/2011