microsoft / microsoft-ui-xaml

WinUI: a modern UI framework with a rich set of controls and styles to build dynamic and high-performing Windows applications.
MIT License
6.38k stars 683 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 2 months ago

johnt-star commented 2 months 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 2 months 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.