Gets the type of the command.
var type = appBarCommand.type;
The command can be one of the following types:
The AppBarCommand.type property takes one of five values:
- button This is the default value for the type. It defines a standard button and can only be applied to a <button> element.
- flyout This creates a button that reveals an HTML fragment adjacent to it (a flyout). To create a flyout AppBarCommand, you need to specify both the type as "flyout" and set its flyout property. The flyout property must reference a defined Flyout control. Only a <button> element can host a flyout AppBarCommand.
- toggle This creates a button that can be selected or de-selected. When the button is selected, the colors of the icon of the AppBarCommand are reversed (black to white and white to black, for example). Only a <button> element can host a toggle AppBarCommand.
- separator This creates a horizontal line in the AppBar, to create a visual separation between other AppBarCommand controls. Only a <hr/> element can host a separator AppBarCommand.
For an app bar toggle command to work with accessibility tools like Narrator, you must attach an onPropertyChange event handler by using the attachEvent method. You must use the detachEvent method to remove the event handler.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
- 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
- Command patterns
- Navigation patterns
- Guidelines for app bars
- Bottom app bar
- Top app bar