ToolTip.StripAmpersands 属性

定义

获取或设置一个值,该值确定如何处理 &。Gets or sets a value that determines how ampersand (&) characters are treated.

public:
 property bool StripAmpersands { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(true)]
public bool StripAmpersands { get; set; }
member this.StripAmpersands : bool with get, set
Public Property StripAmpersands As Boolean

属性值

true如果从工具提示文本中去除了 "&" 字符, 则为;否则为falsetrue if ampersand characters are stripped from the ToolTip text; otherwise, false. 默认值为 false。The default is false.

属性

注解

应用程序通常使用相同的字符串资源来实现多种目的, 例如菜单项和工具提示。An application commonly uses the same string resource for multiple purposes, such as a menu item and a ToolTip. 但是, 菜单通常在菜单项字符串中启用快捷键, 由 "与" 字符表示。However, menus often enable accelerators, denoted by an ampersand character, in the menu item string. 工具提示不支持此功能, 因此默认情况下, & i i i i i i i i i x 普通字符。ToolTips do not support this capability, so by default, ampersands are just displayed as normal characters. 将属性设置为true可从工具提示文本中删除所有的符号。 StripAmpersandsSetting the StripAmpersands property to true removes all ampersands from the ToolTip text.

适用于

另请参阅