Text Property

AccessText.Text Property


Gets or sets the text that is displayed by the AccessText element.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public string Text { get; set; }

Property Value

Type: System.String

The text without the first underscore character. The default is an empty string.

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.

- or - 


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.


The AccessText.

Identifier field


Metadata properties set to true

AffectsMeasure, AffectsRender

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.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft