ILayout.getItemPosition method

This API is no longer supported. Starting with the Windows Library for JavaScript 2.0 Preview, use the ILayout2 interface. Returns the position and size of the specified item.

Syntax

iLayout.getItemPosition(itemIndex).done( /* Your success and error handlers */ );

Parameters

  • itemIndex
    Type: Integer

    The index of the item.

Return value

Type: Promise**

A Promise that returns an object with these properties:

  • left
    Integer

    The x-coordinate of the items left edge.

  • top
    Integer

    The y-coordinate of the items top edge.

  • contentWidth
    Integer

    The width of the win-container that contains the item.

  • contentHeight
    Integer

    The height of the win-container that contains the item.

  • totalWidth
    Integer

    The width of the win-container that contains the item, plus the padding, margin, and border width.

  • totalHeight
    Integer

    The height of the win-container that contains the item, plus the padding, margin, and border height.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ILayout