MenuItem

WPF. MenuItem

MenuItem

Constructor

A menu item in a .NET WPF menu.

Methods

exists() → {Promise.<boolean>}

Indicates whether this menu item exists.
Returns:
a promise that is fulfilled with the indication of whether this menu item exists.
Type
Promise.<boolean>

hasSubMenu() → {Promise.<boolean>}

Indicates whether this menu item contains a sub-menu.
Returns:
a promise that is fulfilled with the indication of whether this menu item contains a sub-menu.
Type
Promise.<boolean>

index() → {Promise.<number>}

The 1-based index of this menu item.
Returns:
a promise that is fulfilled with the 1-based index of this menu item.
Type
Promise.<number>

isChecked() → {Promise.<boolean>}

Indicates whether this menu item has a check mark displayed next to it.
Returns:
a promise that is fulfilled with the indication of whether this menu item has a check mark displayed next to it.
Type
Promise.<boolean>

isEnabled() → {Promise.<boolean>}

Indicates whether this menu item is currently enabled.
Returns:
a promise that is fulfilled with the indication of whether this menu item is currently enabled.
Type
Promise.<boolean>

label() → {Promise.<string>}

The menu item label as a string. If duplicate items exist, returns the index.
Returns:
a promise that is fulfilled with the menu item label as a string or the index if duplicate items exist.
Type
Promise.<string>
The number of items contained in this menu item's sub-menu.
Returns:
a promise that is fulfilled with the number of items contained in this menu item's sub-menu.
Type
Promise.<boolean>