System.Collections.ObjectModel.ObservableCollection<T>.MoveItem Method

Moves the item at the specified index to a new location in the collection.

Syntax

protected virtual void MoveItem (int oldIndex, int newIndex)

Parameters

oldIndex
The zero-based index specifying the location of the item to be moved.
newIndex
The zero-based index specifying the new location of the item.

Remarks

This implementation raises the System.Collections.Specialized.INotifyCollectionChanged.CollectionChanged event.

Subclasses can override this protected method to provide custom behavior for the ObservableCollection`1.Move(int, int) method.

Requirements

Namespace: System.Collections.ObjectModel
Assembly: System (in System.dll)
Assembly Versions: 4.0.0.0