Menu.placement property

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 WinJS version

WinJS 1.0

Namespace

WinJS.UI

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