Share via


ILayout.startLayout method

This API is no longer supported. Starting with the Windows Library for JavaScript 2.0 Preview, use the ILayout2 interface. Begins a layout pass.

Syntax

iLayout.startLayout(beginScrollPosition, endScrollPosition, count).done( /* Your success and error handlers */ );

Parameters

  • beginScrollPosition
    Type: Integer

    The starting pixel of the area to which the items are rendered.

  • endScrollPosition
    Type: Integer

    The last pixel of the area to which the items are rendered.

  • count
    Type: Integer

    The upper bound of the number of items to render.

Return value

Type: Promise**

A Promise that returns an object that has these properties:

  • beginIndex: The data source index of the first item to be realized/rendered.
  • endIndex: The data source index of the last item to be realized/rendered + 1.

Remarks

The ListView uses this method to determine, given the current size of the viewport, which items it should show.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ILayout