MenuItem.Mnemonic 属性

定义

获取一个值,通过该值指示与此菜单项关联的助记字符。Gets a value indicating the mnemonic character that is associated with this menu item.

public:
 property char Mnemonic { char get(); };
[System.ComponentModel.Browsable(false)]
public char Mnemonic { get; }
member this.Mnemonic : char
Public ReadOnly Property Mnemonic As Char

属性值

表示与此菜单项关联的助记字符的字符。A character that represents the mnemonic character associated with this menu item. 如果在 MenuItem 的文本中没有指定助记字符,则返回空字符(ASCII 值为 0)。Returns the NUL character (ASCII value 0) if no mnemonic character is specified in the text of the MenuItem.

属性

注解

助记键字符是 MenuItem文本中的 "&" 字符(&)后面的第一个字符。The mnemonic character is the first character after an ampersand character (&) in the text of the MenuItem. 如果将两个 "与" 符号一起使用,则此属性将不会返回助记键,因为 "&" 用于在 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.

适用于

另请参阅