Export (0) Print
Expand All

NotifyCollectionChangedAction Enumeration

Describes the action that caused a CollectionChanged event.

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

'Declaration
Public Enumeration NotifyCollectionChangedAction

Member nameDescription
Supported by Silverlight for Windows PhoneAddOne or more items were added to the collection.
Supported by Silverlight for Windows PhoneRemoveOne or more items were removed from the collection.
Supported by Silverlight for Windows PhoneReplaceOne or more items were replaced in the collection.
Supported by Silverlight for Windows PhoneResetThe content of the collection changed dramatically.

The .NET Framework implementation of NotifyCollectionChangedAction defined an additional member value Move. Silverlight 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.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft