ILayout.getItemPosition 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 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 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