ListView.indexOfFirstVisible property

Applies to Windows and Windows Phone

Gets or sets the first visible item.

Syntax


<div 
    data-win-control="WinJS.UI.ListView" 
    data-win-options="{ indexOfFirstVisible : value}">
</div>


var indexOfFirstVisible = listView.indexOfFirstVisible;
listView.indexOfFirstVisible = indexOfFirstVisible;

Property value

Type: Number

The index of the first visible item. When you set this property, the ListView scrolls so that the item with the specified index is the first visible item.

Remarks

Just before your app snaps, store the ListView control's indexOfFirstVisible value, and then restore it when the app unsnaps so that the user doesn't lose their position in the list.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI

Library

Ui.js

See also

ListView

 

 

Show:
© 2014 Microsoft. All rights reserved.