Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I read from MSDN that I can use the following XAML code to add access key to a Button.
<Button Click="edit_Click">
<AccessText>_Edit</AccessText>
</Button>
<Button Click="cut_Click">_Cut</Button>
My question is, if the button's only content is '编辑', but I would like to use alt+e as the shortcut to access this button. Is it able to do so?
Thanks!
<Button Click="Button_Click">
<AccessText Text="编辑(_E)" />
</Button>
or
<Button Click="Button_Click">
<Grid>
<AccessText Opacity="0">_E</AccessText>
<TextBlock Text="编辑" />
</Grid>
</Button>