NotifyCollectionChangedEventArgs 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 NotifyCollectionChangedEventArgs 类的新实例。
重载
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction)
初始化描述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)
参数
导致事件的操作。 此属性必须设置为 Reset。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList)
初始化描述多项更改的 NotifyCollectionChangedEventArgs 类的新实例。
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)
参数
- changedItems
- IList
受更改影响的项。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object)
初始化描述一项更改的 NotifyCollectionChangedEventArgs 类的新实例。
public:
NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::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)
参数
- changedItem
- Object
受更改影响的项。
例外
如果未 action 重置、添加或删除,或者 action 重置且 changedItem 不为 null。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList)
初始化描述多项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)
参数
导致事件的操作。 这只能设置为 Replace。
- newItems
- IList
替换原始项的新项。
- oldItems
- IList
被替换的原始项。
例外
如果未 action 替换。
如果 oldItems 为 null,则 newItems 为 null。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32)
初始化描述多项更改或更改Reset的NotifyCollectionChangedEventArgs类的新实例。
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)
参数
- changedItems
- IList
受更改影响的项。
- startingIndex
- Int32
发生更改的索引。
例外
如果未 action 重置、添加或删除,则 action 为 Reset 且 changedItems 不是 null 或 startingIndex 不是 -1,或者操作为“添加或删除”且 startingIndex 小于 -1。
如果 action 为“添加或删除”,则 changedItems 为 null。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32)
初始化描述一项更改的 NotifyCollectionChangedEventArgs 类的新实例。
public:
NotifyCollectionChangedEventArgs(System::Collections::Specialized::NotifyCollectionChangedAction action, System::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)
参数
- changedItem
- Object
受更改影响的项。
- index
- Int32
发生更改的索引。
例外
如果未 action 重置、添加或删除,或者 action 重置且 changedItem 不是 null 或 index 不是 -1。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object)
初始化描述一项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);
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)
参数
导致事件的操作。 这只能设置为 Replace。
- newItem
- Object
正在替换原始项的新项。
- oldItem
- Object
替换的原始项。
例外
如果未 action 替换。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, IList, Int32)
初始化描述多项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)
参数
导致事件的操作。 这只能设置为 Replace。
- newItems
- IList
替换原始项的新项。
- oldItems
- IList
被替换的原始项。
- startingIndex
- Int32
要替换的项的第一项的索引。
例外
如果未 action 替换。
如果 oldItems 为 null,则 newItems 为 null。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IList, Int32, Int32)
初始化描述多项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);
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)
参数
导致事件的操作。 这只能设置为 Move。
- changedItems
- IList
受更改影响的项。
- index
- Int32
已更改项的新索引。
- oldIndex
- Int32
已更改项的旧索引。
例外
如果未 action 移动或 index 小于 0。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Int32, Int32)
初始化描述一项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);
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)
参数
导致事件的操作。 这只能设置为 Move。
- changedItem
- Object
受更改影响的项。
- index
- Int32
已更改项的新索引。
- oldIndex
- Int32
已更改项的旧索引。
例外
如果未 action 移动或 index 小于 0。
适用于
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, Object, Object, Int32)
初始化描述一项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);
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)
参数
导致事件的操作。 这可以设置为 Replace.
- newItem
- Object
正在替换原始项的新项。
- oldItem
- Object
替换的原始项。
- index
- Int32
要替换的项的索引。
例外
如果未 action 替换。