If your content has multiple underscore characters, only the first one is converted into an AccessKey; the other underscores appear as normal text. If the underscore that you want converted to the access key is not the first underscore, use two consecutive underscores for any underscores that precede the one that you want to convert. For example, the following code contains an access key and displays as _HelloWorld:
|
<AccessText>__Hello_World</AccessText>
|
Because the underscore that precedes H is a double, the W key registers as the access key.
To use AccessText as a content host in a control style, set RecognizesAccessKey in the ContentPresenter, as this example shows:
|
<ContentPresenter RecognizesAccessKey="True"/>
|