다음을 통해 공유


MenuCommand.type property

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

WinJS 1.0

Namespace

WinJS.UI

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