XRCollectionChangeAction (Compact 2013)

3/28/2014

This enumeration describes the action that caused a CollectionChanged event.

Syntax

enum XRCollectionChangeAction
{
    XRCollectionChangeAction_Add = 0,
    XRCollectionChangeAction_Remove,
    XRCollectionChangeAction_Replace,
    XRCollectionChangeAction_Move,
    XRCollectionChangeAction_Reset,
};

Members

  • XRCollectionChangeAction_Add
    One or more items were added to the collection.
  • XRCollectionChangeAction_Remove
    One or more items were removed from the collection.
  • XRCollectionChangeAction_Replace
    One or more items were replaced in the collection.
  • XRCollectionChangeAction_Move
    One or more items were moved in the collection.
  • XRCollectionChangeAction_Reset
    The content of the collection changed dramatically (multiple changes).

Remarks

To move a collection item, you typically call the Remove and Add methods of a collection class in sequence. These calls cause the IXRNotifyCollectionChanged::GetCollectionChangedEvent method to report that the collection item was moved.

We recommend that you report Reset when the number of individual Add, Remove, or Replace actions necessary to properly report changes in a collection becomes excessive. For example, we recommend that you report Reset if a list was completely re-ordered based on some operation such as sorting.

.NET Framework Equivalent

System.Collections.Specialized.NotifyCollectionChangedAction

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XAML for Windows Embedded Enumerations
XRCollectionChangedCustomEventArgs
IXRNotifyCollectionChanged::GetCollectionChangedEvent