-
-
Notifications
You must be signed in to change notification settings - Fork 931
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Buttons do not recognize the access key from their assigned content.
To Reproduce
- Add a button - either a built-in button or a UI button.
- Assign its content to a string which includes an access key - for example,
"_OK". - Run the application.
Expected behavior
The button should display the text OK, and recognize the "O" as the access key.
Screenshots
The button displays the text verbatim, including the underscore:
OS version
Windows 11 24H2
.NET version
.NET Framework 4.8
WPF-UI NuGet version
4.0.3
Additional context
The button styles need to set RecognizesAccessKey="True" on the ContentPresenter elements.
The current workaround is to add a global override to the application styles:
<Style TargetType="{x:Type ContentPresenter}">
<Setter Property="RecognizesAccessKey" Value="True" />
</Style>

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working