MenuItem.Mnemonic Property

Definition

Gets a value indicating the mnemonic character that is associated with this menu item.

C#
[System.ComponentModel.Browsable(false)]
public char Mnemonic { get; }

Property Value

A character that represents the mnemonic character associated with this menu item. Returns the NUL character (ASCII value 0) if no mnemonic character is specified in the text of the MenuItem.

Attributes

Remarks

The mnemonic character is the first character after an ampersand character (&) in the text of the MenuItem. This property will not return a mnemonic if two ampersand characters are placed together as the ampersands are used to display an ampersand in the text of the MenuItem instead of defining a mnemonic character.

Applies to

Produkt Verzie
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 10

See also