microsoft / microsoft/microsoft-ui-xaml

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

Open
#10,017 2 comments 0 reactions 0 assignees View on GitHub
area-SplitButton area-Styling team-Controls
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### 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:


### 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](https://github.com/user-attachments/assets/9e547d0c-6be9-43d4-8275-8f23ce1e34ae)

Buttons disabled - Toggle Split Button is Light Gray instead of configured value
![image](https://github.com/user-attachments/assets/54b9fe6c-f002-457b-815f-fe142d952ff6)

### 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](https://github.com/user-attachments/files/17003103/ToggleButtonBackground.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached ToggleButtonBackground.zip sample and compare the ToggleButtonBackgroundDisabled and ToggleSplitButtonBackgroundDisabled resource usage when controls are disabled. Trace the Toggle Split Button's disabled visual state and verify that the configured LightBlue brush is applied, matching the regular Toggle Button.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.