INotifyCollectionChanged Interface

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Notifies listeners of dynamic changes to a collection, such as when items are added and removed, or the entire collection object is reset.

Namespace: System.Collections.Specialized
Assembly: System (in System.dll)

Syntax

Public Interface INotifyCollectionChanged
public interface INotifyCollectionChanged

The INotifyCollectionChanged type exposes the following members.

Events

Name Description
CollectionChanged Occurs when the items list of the collection has changed, or the collection is reset.

Top

Remarks

INotifyCollectionChanged defines one member, CollectionChanged. The event data of this event (NotifyCollectionChangedEventArgs) reports information about the nature of the collection change.

To provide change notifications for bindings to ItemsControl and its subclasses, your collection must implement this interface. Before implementing your own collection class, consider using the ObservableCollection<(Of <(T>)>) class that implements INotifyCollectionChanged and INotifyPropertyChanged.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

System.Collections.Specialized Namespace

ObservableCollection<(Of <(T>)>)

Other Resources

Data binding for Windows Phone 8

Walkthrough: Updating a local database app for Windows Phone 8