다음을 통해 공유


ILayout.calculateFirstVisible method

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 WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ILayout