ListView.indexOfFirstVisible property

1 out of 1 rated this helpful - Rate this topic

Gets or sets the first visible item.

Syntax


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


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

Property value

Type: Number

The index of the first visible item. When setting 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]

Namespace

WinJS.UI

Library

Ui.js

See also

ListView

 

 

Build date: 12/5/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.