AppBarButton doesn't react to AppBarButtonBackgroundPointerOver when in CommandBar
See original GitHub issueDescribe the bug
AppBarButton
doesn’t react to AppBarButtonBackgroundPointerOver
when in CommandBar
Steps to reproduce the bug
Steps to reproduce the behavior: Use this code:
<Grid>
<CommandBar Background="Transparent">
<CommandBar.PrimaryCommands>
<AppBarButton Icon="Add" Label="Add">
<AppBarButton.Resources>
<SolidColorBrush x:Key="AppBarButtonBackgroundPointerOver" Color="AliceBlue"/>
</AppBarButton.Resources>
</AppBarButton>
</CommandBar.PrimaryCommands>
</CommandBar>
</Grid>
Expected behavior The AppBarButton should have AliceBlue color when the pointer is over
Screenshots
Version Info
NuGet package version: Microsoft.UI.Xaml 2.4.2
Windows 10 version | Saw the problem? |
---|---|
Insider Build (xxxxx) | |
November 2019 Update (18363) | Yes |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Mobile | |
Xbox | |
Surface Hub | |
IoT |
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
CommandBar.Content AppBarButton Label position right
So now how I trigger that the label are on the right? DefaultLabelPosition doesn't effect the content values. I want to create a...
Read more >AppBarButton Class (Windows.UI.Xaml.Controls)
Represents a templated button control to be displayed in an AppBar. ... For more info, design guidance, and code examples, see Command bar....
Read more >CommandBar Class (Microsoft.UI.Xaml.Controls)
Represents a specialized app bar that provides layout for AppBarButton and related command elements.
Read more >CommandBar
The AppBarButton in Uno is designed to be used the same way you would use the AppBarButton on UWP. In most cases, you...
Read more >[Solved]-CommandBar.Content AppBarButton Label position right-C#
1) DefaultLabelPosition can be used in apps targeting Anniversary Update. So if you want to use this for apps targeting previous versions, it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do we know what the status of this is? It seems this is an issue with the latest WinUI3 and not sure what the workaround is? I tried using styles (AppBarButtonBackgroundPointerOver) but they don’t seem to be recognized?
https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.appbarbutton?view=winui-3.0 https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/xaml-styles
CommandBar uses reveal on its children which likely what is causing this. You cannot get both reveal and this color at the same time.