EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

AppBarCommand.section property

Applies to Windows and Windows Phone

Gets or sets the section of the AppBar that hosts this AppBarCommand.

Syntax


var section = appBarCommand.section;

Property value

Type: String

One of the following values:

ValueCondition
"primary"

When the AppBar is using the "menu" layout, this value indicates that the command should be displayed at all times.

"secondary"

When the AppBar is using the "menu" layout, this value indicates that the command does not need to be displayed at all times.

"global"

Deprecated. Use "primary" or "secondary" instead.

When the AppBar is using the "commands" layout, the command should appear in the left in LTR (left-to-right) layouts. The opposite is true in RTL (right-to-left) layouts.

"selection"

Deprecated. Use "primary" or "secondary" instead.

When the AppBar is using the "commands" layout, the command should appear in the right in LTR (left-to-right) layouts. The opposite is true in RTL (right-to-left) layouts.

 

Remarks

Using the section property with the "commands" layout

An AppBar control with a layout property set to "commands" can contain only AppBarCommand controls.

The "commands" value is the default setting for the layout property. This layout includes two sections: "primary" and "secondary".

"primary" maps to right and "selection" maps to left in LTR (left-to-right) layouts. The opposite is true in RTL (right-to-left) layouts.

"global" is intended for commands that should be displayed at all times.

"selection" is intended for context commands for selected objects.

  • Applies to Windows Phone

Note  For Windows Phone Store apps:

"global" is for primary commands that are always visible in the app bar.

"selection" is for non-primary (or secondary) commands. These are text-based menu items that appear when a primary command is invoked.

Note  You can put any HTML in the app bar if you set the layout to "custom". However, an app bar with a "custom" layout doesn’t have the full functionality available to an app bar using the "commands" layout.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI

Library

Winjs.js

See also

AppBarCommand
AppBar
AppBarIcon
BackButton
NavBar
Your first app - Part 3: PageControl objects and navigation
Navigating between pages (HTML)
Adding app bars
Adding nav bars
HTML AppBar control sample
HTML NavBar control sample
Navigation and navigation history sample
Designers
Command patterns
Navigation patterns
Guidelines for app bars
Bottom app bar
Top app bar

 

 

Mostrar:
© 2015 Microsoft