microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.34k stars 677 forks source link

Cannot customize Toggle Split Button disabled background colour the same way you can for other button type #10017

Open johnt-star opened 1 month ago

johnt-star commented 1 month ago

Describe the bug

When disabling Toggle Split Button, the disabled background color remains light gray, regardless of how it is customized in the dictionary.

All other buttons can have their disabled background color can be customized.

Steps to reproduce the bug

I am including an app that demonstrates the issue - see screenshots.

The app shows 3 controls with the left most button disabling/enabling the other 2 controls.

Clicking the "Click Me" button disables the other 2controls, and the Toggle Button is configured correctly while Toggle Split Button is not

Note that these are the custom dictionary entries for the 2 controls to set their Disabled Background Colors:

<SolidColorBrush x:Key="ToggleButtonBackgroundDisabled" Color="LightBlue" />

<!-- ToggleSplitButtonBackgroundDisabled Customizations -->
<SolidColorBrush x:Key="ToggleSplitButtonBackgroundDisabled" Color="LightBlue" />

Expected behavior

Toggle Split Button should be the configured disabled color when the Toggle Split Button is disabled.

Screenshots

Buttons enabled at start up: image

Buttons disabled - Toggle Split Button is Light Gray instead of configured value image

NuGet package version

Windows App SDK 1.6.0: 1.6.240829007

Packaging type

Packaged (MSIX)

Windows version

Windows 10 version 22H2 (19045, 2022 Update)

IDE

Visual Studio 2022

Additional context

Attaching sample project

ToggleButtonBackground.zip

github-actions[bot] commented 3 weeks ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.