NotifyCollectionChangedEventArgs
NotifyCollectionChangedEventArgs
NotifyCollectionChangedEventArgs
NotifyCollectionChangedEventArgs
Class
Definition
Provides the event data for a CollectionChanged event.
.NET This class appears as System.Collections.Specialized.NotifyCollectionChangedEventArgs.
public : class NotifyCollectionChangedEventArgs : INotifyCollectionChangedEventArgspublic class NotifyCollectionChangedEventArgs : INotifyCollectionChangedEventArgsPublic Class NotifyCollectionChangedEventArgs Implements INotifyCollectionChangedEventArgs// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
Constructors
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IBindableVector, IBindableVector, Int32, Int32) NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IBindableVector, IBindableVector, Int32, Int32) NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IBindableVector, IBindableVector, Int32, Int32) NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction, IBindableVector, IBindableVector, Int32, Int32)
Initializes a new instance of the NotifyCollectionChangedEventArgs class.
public : NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IBindableVector newItems, IBindableVector oldItems, int newIndex, int oldIndex)public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IList newItems, IList oldItems, Int32 newIndex, Int32 oldIndex)Public Sub New(action As NotifyCollectionChangedAction, newItems As IList, oldItems As IList, newIndex As Int32, oldIndex As Int32)// This API is not available in Javascript.
- action
- NotifyCollectionChangedAction NotifyCollectionChangedAction NotifyCollectionChangedAction NotifyCollectionChangedAction
The Action value to report.
- newItems
- IBindableVector IList IList IList
The NewItems value to report.
- oldItems
- IBindableVector IList IList IList
The OldItems value to report.
- newIndex
- int Int32 Int32 Int32
The NewStartingIndex value to report.
- oldIndex
- int Int32 Int32 Int32
The OldStartingIndex value to report.
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
Other than action, any of the values for this constructor can potentially be passed as null, depending on the collection change and corresponding Action being reported.
- See Also
Properties
Action Action Action Action
Gets the description of the action that caused the event.
public : NotifyCollectionChangedAction Action { get; }public NotifyCollectionChangedAction Action { get; }Public ReadOnly Property Action As NotifyCollectionChangedAction// This API is not available in Javascript.
- Value
- NotifyCollectionChangedAction NotifyCollectionChangedAction NotifyCollectionChangedAction NotifyCollectionChangedAction
The description of the action that caused the event, as a value of the enumeration.
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
- See Also
NewItems NewItems NewItems NewItems
Gets the items affected by an action.
public : IBindableVector NewItems { get; }public IList NewItems { get; }Public ReadOnly Property NewItems As IList// This API is not available in Javascript.
- Value
- IBindableVector IList IList IList
The bindable vector of items affected by an action.
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
- See Also
NewStartingIndex NewStartingIndex NewStartingIndex NewStartingIndex
Gets the index at which the change occurred.
public : int NewStartingIndex { get; }public int NewStartingIndex { get; }Public ReadOnly Property NewStartingIndex As int// This API is not available in Javascript.
- Value
- int int int int
The index at which the change occurred.
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
NewStartingIndex will contain the following values, depending on the Action being reported in the event data.
| Action | Value |
|---|---|
| Add | The index of the newly added item. |
| Move | The index of the newly added item. Because a Move can logically be considered a virtual Remove followed by a virtual Add, the index reported here might already be adjusted for the virtual Remove. |
| Remove | -1 |
| Replace | The index of the replaced item. |
| Reset | -1 |
Note that this value is signed. This enables the -1 value cases.
- See Also
OldItems OldItems OldItems OldItems
Gets the item affected by a Replace or Remove action.
public : IBindableVector OldItems { get; }public IList OldItems { get; }Public ReadOnly Property OldItems As IList// This API is not available in Javascript.
- Value
- IBindableVector IList IList IList
The bindable vector of items affected by a Replace or Remove action.
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
- See Also
OldStartingIndex OldStartingIndex OldStartingIndex OldStartingIndex
Gets the starting index at which a Move, Remove, or Replace action occurred.
public : int OldStartingIndex { get; }public int OldStartingIndex { get; }Public ReadOnly Property OldStartingIndex As int// This API is not available in Javascript.
- Value
- int int int int
The zero-based index at which a Move, Remove, or Replace action occurred.
Remarks
When programming with .NET, this class is hidden and developers should use the System.Collections.Specialized.NotifyCollectionChangedEventArgs class.
- See Also