Share via


PagedCollectionView.MoveCurrentToPosition Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets the item at the specified index to be the CurrentItem in the view.

Namespace:  System.Windows.Data
Assembly:  System.Windows.Data (in System.Windows.Data.dll)

Syntax

'Declaration
Public Function MoveCurrentToPosition ( _
    position As Integer _
) As Boolean
public bool MoveCurrentToPosition(
    int position
)

Parameters

Return Value

Type: System.Boolean
true if the resulting CurrentItem is an item in the view; otherwise, false.

Implements

ICollectionView.MoveCurrentToPosition(Int32)

Exceptions

Exception Condition
ArgumentOutOfRangeException

position is less than -1 or greater than the Count of items in the view.

Remarks

Collection views support the concept of a current record pointer. As you navigate through the objects in a collection view, you are moving a record pointer that enables you to retrieve the object that exists at that particular location in the collection.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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