MoveItem Method

ObservableCollection<T>.MoveItem Method (Int32, Int32)

 

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

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

protected virtual void MoveItem(
	int oldIndex,
	int newIndex
)

Parameters

oldIndex
Type: System.Int32

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

newIndex
Type: System.Int32

The zero-based index specifying the new location of the item.

This implementation raises the CollectionChanged event.

Subclasses can override this protected method to provide custom behavior for the Move method.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft