EN
此内容没有您的语言版本,但有英语版本。

Menu.placement property

Applies to Windows only

Gets or sets the placement to be used for this Menu relative to the target object.

This value is overridden by the value of placement passed in the show method.

Syntax


var placement = menu.placement;
menu.placement = placement;

Property value

Type: Object

The placement of the Menu relative to the target: the string literal "auto", "top", "bottom", "left", or "right". The default is "auto".

If the value is "auto", the menu is placed such that the entire menu can be shown without being resized.

If the value is "top", "bottom", "left", or "right", the menu is shown on the side specified and, if necessary, resized to fit.

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

Library

Ui.js

See also

Menu
MenuCommand
WinJS.UI Namespace
MenuCommand
Flyout
Displaying popups
Laying out your UI
HTML flyout control sample
Designers
Command patterns
Flyout
Guidelines for flyouts
Context menu
Guidelines for context menus

 

 

显示:
© 2014 Microsoft