NotifyCollectionChangedEventArgs 构造函数

定义

初始化 NotifyCollectionChangedEventArgs 类的新实例。

重载

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)

初始化描述 Reset 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList)

初始化描述多项更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object)

初始化描述单项更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList)

初始化描述多项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32)

初始化 NotifyCollectionChangedEventArgs 类的新实例,该类描述多项更改或 Reset 更改。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)

初始化描述单项更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object)

初始化描述单项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList, Int32)

初始化描述多项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32, Int32)

初始化描述多项 Move 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32, Int32)

初始化描述单项 Move 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object, Int32)

初始化描述单项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)

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

初始化描述 Reset 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 此属性必须设置为 Reset

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList)

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

初始化描述多项更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 该操作可以设置为 ResetAddRemove

changedItems
IList

受此更改影响的项。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object)

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

初始化描述单项更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 该操作可以设置为 ResetAddRemove

changedItem
Object

受更改影响的项。

例外

如果 action 不是 Reset、Add 或 Remove;或者,如果 action 是 Reset,并且 changedItem 不是 null。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList)

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

初始化描述多项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 只能设置为 Replace

newItems
IList

要替换原始项的新项。

oldItems
IList

被替换的原始项。

例外

如果 action 不是 Replace。

如果 oldItemsnewItems 为 null。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32)

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

初始化 NotifyCollectionChangedEventArgs 类的新实例,该类描述多项更改或 Reset 更改。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 该操作可以设置为 ResetAddRemove

changedItems
IList

受此更改影响的项。

startingIndex
Int32

发生更改处的索引。

例外

如果 action 不是 Reset、Add 或 Remove;如果 action 是 Reset,并且要么 changedItems 不是 null,要么 startingIndex 不是 –1;或者如果 action 是 Add 或 Remove,并且 startingIndex 小于 –1。

如果 action 是 Add 或 Remove,并且 changedItems 是 null。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)

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

初始化描述单项更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 该操作可以设置为 ResetAddRemove

changedItem
Object

受更改影响的项。

index
Int32

发生更改处的索引。

例外

如果 action 不是 Reset、Add 或 Remove;或者,如果 action 是 Reset,并且 changedItems 不是 null,或者 index 不是 –1。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object)

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

初始化描述单项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 只能设置为 Replace

newItem
Object

要替换原始项的新项。

oldItem
Object

被替换的原始项。

例外

如果 action 不是 Replace。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList, Int32)

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

初始化描述多项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 只能设置为 Replace

newItems
IList

要替换原始项的新项。

oldItems
IList

被替换的原始项。

startingIndex
Int32

要替换的各项中第一项的索引。

例外

如果 action 不是 Replace。

如果 oldItemsnewItems 为 null。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32, Int32)

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

初始化描述多项 Move 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 只能设置为 Move

changedItems
IList

受此更改影响的项。

index
Int32

已更改的项的新索引。

oldIndex
Int32

已更改的项的旧索引。

例外

如果 action 不为 Move 或者 index 小于 0。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32, Int32)

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

初始化描述单项 Move 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 只能设置为 Move

changedItem
Object

受更改影响的项。

index
Int32

已更改的项的新索引。

oldIndex
Int32

已更改的项的旧索引。

例外

如果 action 不为 Move 或者 index 小于 0。

适用于

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object, Int32)

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

初始化描述单项 Replace 更改的 NotifyCollectionChangedEventArgs 类的新实例。

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)

参数

action
NotifyCollectionChangedAction

引起该事件的操作。 可以设置为 Replace

newItem
Object

要替换原始项的新项。

oldItem
Object

被替换的原始项。

index
Int32

要被替换的项的索引。

例外

如果 action 不是 Replace。

适用于