Compartir a través de


ILayout.getKeyboardNavigatedItem 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 item to which the user navigated.

Syntax

iLayout.getKeyboardNavigatedItem(itemIndex, element, keyPressed).done( /* Your success and error handlers */ );

Parameters

  • itemIndex
    Type: Integer

    The data source index of the current item.

  • element
    Type: HTMLElement

    The element for the current item.

  • keyPressed
    Type: WinJS.Utilities.Key**

    The key that was pressed. This function must check for the arrow keys (leftArrow, upArrow, rightArrow, downArrow), pageDown, and pageUp and determine which item the user navigated to.

Return value

Type: Promise**

A Promise that contains the index of the next item (This item becomes the current item).

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ILayout