Edit

Share via


NotifyCollectionChangedEventArgs Constructors

Definition

Initializes a new instance of the NotifyCollectionChangedEventArgs class.

Overloads

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a Reset change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item Replace change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item change or a Reset change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item Replace change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item Replace change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item Move change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item Move change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object, Int32)

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item Replace change.

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a Reset change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This must be set to Reset.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Collections::IList ^ changedItems);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList changedItems);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList? changedItems);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * System.Collections.IList -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, changedItems As IList)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can be set to Reset, Add, or Remove.

changedItems
IList

The items that are affected by the change.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Object ^ changedItem);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object changedItem);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object? changedItem);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * obj -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, changedItem As Object)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can be set to Reset, Add, or Remove.

changedItem
Object

The item that is affected by the change.

Exceptions

If action is not Reset, Add, or Remove, or if action is Reset and changedItem is not null.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item Replace change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Collections::IList ^ newItems, System::Collections::IList ^ oldItems);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList newItems, System.Collections.IList oldItems);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * System.Collections.IList * System.Collections.IList -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, newItems As IList, oldItems As IList)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can only be set to Replace.

newItems
IList

The new items that are replacing the original items.

oldItems
IList

The original items that are replaced.

Exceptions

If action is not Replace.

If oldItems or newItems is null.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item change or a Reset change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Collections::IList ^ changedItems, int startingIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList changedItems, int startingIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList? changedItems, int startingIndex);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * System.Collections.IList * int -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, changedItems As IList, startingIndex As Integer)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can be set to Reset, Add, or Remove.

changedItems
IList

The items affected by the change.

startingIndex
Int32

The index where the change occurred.

Exceptions

If action is not Reset, Add, or Remove, if action is Reset and either changedItems is not null or startingIndex is not -1, or if action is Add or Remove and startingIndex is less than -1.

If action is Add or Remove and changedItems is null.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Object ^ changedItem, int index);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object changedItem, int index);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object? changedItem, int index);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * obj * int -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, changedItem As Object, index As Integer)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can be set to Reset, Add, or Remove.

changedItem
Object

The item that is affected by the change.

index
Int32

The index where the change occurred.

Exceptions

If action is not Reset, Add, or Remove, or if action is Reset and either changedItems is not null or index is not -1.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item Replace change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Object ^ newItem, System::Object ^ oldItem);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object newItem, object oldItem);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object? newItem, object? oldItem);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * obj * obj -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, newItem As Object, oldItem As Object)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can only be set to Replace.

newItem
Object

The new item that is replacing the original item.

oldItem
Object

The original item that is replaced.

Exceptions

If action is not Replace.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList, Int32)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item Replace change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Collections::IList ^ newItems, System::Collections::IList ^ oldItems, int startingIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList newItems, System.Collections.IList oldItems, int startingIndex);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * System.Collections.IList * System.Collections.IList * int -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, newItems As IList, oldItems As IList, startingIndex As Integer)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can only be set to Replace.

newItems
IList

The new items that are replacing the original items.

oldItems
IList

The original items that are replaced.

startingIndex
Int32

The index of the first item of the items that are being replaced.

Exceptions

If action is not Replace.

If oldItems or newItems is null.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32, Int32)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a multi-item Move change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Collections::IList ^ changedItems, int index, int oldIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList changedItems, int index, int oldIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Collections.IList? changedItems, int index, int oldIndex);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * System.Collections.IList * int * int -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, changedItems As IList, index As Integer, oldIndex As Integer)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can only be set to Move.

changedItems
IList

The items affected by the change.

index
Int32

The new index for the changed items.

oldIndex
Int32

The old index for the changed items.

Exceptions

If action is not Move or index is less than 0.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32, Int32)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item Move change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Object ^ changedItem, int index, int oldIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object changedItem, int index, int oldIndex);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object? changedItem, int index, int oldIndex);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * obj * int * int -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, changedItem As Object, index As Integer, oldIndex As Integer)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can only be set to Move.

changedItem
Object

The item affected by the change.

index
Int32

The new index for the changed item.

oldIndex
Int32

The old index for the changed item.

Exceptions

If action is not Move or index is less than 0.

Applies to

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object, Int32)

Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs
Source:
NotifyCollectionChangedEventArgs.cs

Initializes a new instance of the NotifyCollectionChangedEventArgs class that describes a one-item Replace change.

public:
 NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::Object ^ newItem, System::Object ^ oldItem, int index);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object newItem, object oldItem, int index);
public NotifyCollectionChangedEventArgs (System.Collections.Specialized.NotifyCollectionChangedAction action, object? newItem, object? oldItem, int index);
new System.Collections.Specialized.NotifyCollectionChangedEventArgs : System.Collections.Specialized.NotifyCollectionChangedAction * obj * obj * int -> System.Collections.Specialized.NotifyCollectionChangedEventArgs
Public Sub New (action As NotifyCollectionChangedAction, newItem As Object, oldItem As Object, index As Integer)

Parameters

action
NotifyCollectionChangedAction

The action that caused the event. This can be set to Replace.

newItem
Object

The new item that is replacing the original item.

oldItem
Object

The original item that is replaced.

index
Int32

The index of the item being replaced.

Exceptions

If action is not Replace.

Applies to