NotifyCollectionChangedAction Enumeration
Collapse the table of content
Expand the table of content

NotifyCollectionChangedAction Enumeration

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

Describes the action that caused a CollectionChanged event.

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

public enum NotifyCollectionChangedAction

Member nameDescription
AddOne or more items were added to the collection.
MoveOne or more items were moved within the collection.
RemoveOne or more items were removed from the collection.
ReplaceOne or more items were replaced in the collection.
ResetThe content of the collection changed dramatically.

The .NET Framework implementation of NotifyCollectionChangedAction defined an additional member value Move. Windows Phone does not support this value. Moving a collection item should be reported through the actions that initiated the move, which are typically calls to Remove and Add in sequence. (Most collection classes or interfaces do not define an explicit "Move" API.)

Reporting Reset is discretionary. You should report Reset in cases where the number of individual Add / Remove / Replace actions necessary to properly report changes in a collection becomes excessive. For example, you should report Reset if a list was completely re-ordered based on some operation such as sorting.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft