ILayout.calculateFirstVisible method

Applies to Windows only

This API is no longer supported. Starting with the Windows Library for JavaScript 2.0 Preview, use the ILayout2 interface. Returns the index of the first item visible at the specified point.

Syntax


iLayout.calculateFirstVisible(beginScrollPosition, wholeItem).done( /* Your success and error handlers */ );

Parameters

beginScrollPosition

Type: Integer

The first visible pixel in the ListView. For horizontal layouts, this is the x-coordinate of the pixel. For vertical layouts, this is the y-coordinate.

wholeItem

Type: Boolean

true if the item must be completely visible; otherwise, false if its ok for the item to be partially visible. Promise

Return value

Type: Promise

A Promise for the index of the first visible item at the specified point.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

WinJS.UI

See also

ILayout

 

 

Show:
© 2014 Microsoft