Inhaltsverzeichnis reduzieren
Inhaltsverzeichnis erweitern
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

IZoomableView.positionItem method

Applies to Windows and Windows Phone

Positions the specified item within the viewport of the child control when panning or zooming begins.


iZoomableView.positionItem(item, position).done( /* Your success and error handlers */ );



Type: Variant

The object to position within the viewport of the child control.

item can be a number, a string, or an object with any number of properties.


Type: Variant

An object that contains the position data of the item relative to the child control.

position must be an object with four number properties: left, top, width, and height.

These values specify a rectangle that is typically the bounding box of the current item, though the details are up to the control. The units of the position must be in pixels. And the coordinates must be relative to the top-left of the control viewport (which should occupy the same area as the semantic zoom viewport), except when in RTL mode. In RTL mode, return coordinates relative to the top-right off the control viewport.

The rectangle is transformed from the coordinate system of one control to that of the other.

Return value

Type: Promise

When completed, this promise returns an object with x and y properties, which represent the location of the positioned item.


Minimum WinJS version

WinJS 3.0



See also




© 2017 Microsoft