NotifyCollectionChangedEventArgs 建構函式

定義

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體。

多載

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述 Reset 變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目的變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目 Replace 的變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目的變更或 Reset 變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的 Replace 變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList, Int32)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目 Replace 的變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32, Int32)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目 Move 的變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32, Int32)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的 Move 變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object, Int32)

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的 Replace 變更。

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述 Reset 變更。

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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目 Replace 的變更。

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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
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,或如果動作是 Add 或 Remove 且 startingIndex 小於 -1。

如果 action 是 Add 或 Remove 且 changedItems 為 null。

適用於

NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的 Replace 變更。

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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目 Replace 的變更。

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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述多個項目 Move 的變更。

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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的 Move 變更。

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)

來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs
來源:
NotifyCollectionChangedEventArgs.cs

初始化 NotifyCollectionChangedEventArgs 類別的新執行個體,這個執行個體會描述一個項目的 Replace 變更。

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。

適用於