AccessText.Text Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the text that is displayed by the AccessText element.
public:
property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
public string Text { get; set; }
member this.Text : string with get, set
Public Property Text As String
The text without the first underscore character. The default is an empty string.
The following example creates an access key that customizes the first letter of the access key, which contains the mnemonic, and then sets the rest of the text by using the Text property.
<DockPanel>
<AccessText Background="Red" Foreground="LightBlue" FontFamily="Arial Narrow" FontSize="16" FontStyle="Italic"
FontWeight="Bold">_E</AccessText><AccessText Text="dit"/>
</DockPanel>
An access key is not created if you use the Text property to supply text for an AccessText element. This property is used internally to determine the text that is displayed by the access key. You can use this property to set additional text that does not contain the mnemonic (underlined character) or to retrieve the access key text.
<object>_accessText</object>
- or -
<object><accessTextObject>_accessText</accessTextObject></object>
_accessText A string that contains the underscore character. This value becomes an AccessText that handles access keys for the object. The access key is the character that immediately follows the underscore.
accessTextObject The AccessText.
Item | Value |
---|---|
Identifier field | TextProperty |
Metadata properties set to true |
AffectsMeasure, AffectsRender |
Продукт | Версии |
---|---|
.NET Framework | 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, 3.1, 5, 6, 7, 8, 9, 10 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: