MenuCommand.type property

Applies to Windows only

Gets the type of the command.

The command can be one of the following types:

  • "button"
  • "toggle"
  • "flyout"
  • "separator"

Syntax


var type = menuCommand.type;

Property value

Type: string

The type of the command.

Remarks

For a toggle menu 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.

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

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

 

 

Show:
© 2014 Microsoft