Export (0) Print
Expand All

NotifyCollectionChangedEventArgs Constructor (NotifyCollectionChangedAction, Object, Object, Int32)

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

Namespace:  System.Collections.Specialized
Assembly:  System.Windows (in System.Windows.dll)

public NotifyCollectionChangedEventArgs(
	NotifyCollectionChangedAction action,
	Object newItem,
	Object oldItem,
	int index
)

Parameters

action
Type: System.Collections.Specialized.NotifyCollectionChangedAction
The action value, as a value of the enumeration. This should be Replace; see Remarks.
newItem
Type: System.Object
The new item that is replacing the original item.
oldItem
Type: System.Object
The original item that is replaced.
index
Type: System.Int32
The index of the item being replaced.

ExceptionCondition
NotSupportedException

action is not Replace.

After construction, NotifyCollectionChangedEventArgs properties are immutable. A Replace action should use this signature because it needs to specify the old and new items. Other actions should use the other signatures.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft