microsoft / microsoft/microsoft-ui-xaml

Checkbox foreground property set differently between checked and unchecked states

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

Description

### Describe the bug

On a checkbox, if you set the Foreground property to "Red". The UI is correct while the CheckBox is in the unChecked state. It handles mouse over/exit operations correctly.
When the checkBox state changes to Checked, the Foreground reverts back to default. Red is no longer displayed. Unchecking reverts back to red.

### Steps to reproduce the bug

### Expected behavior

Red should be sustained color in all modes.

### Screenshots

![Image](https://github.com/user-attachments/assets/1f0a9466-1533-49d6-b27c-00a112a2a479)

![Image](https://github.com/user-attachments/assets/49805628-ba38-4a16-b361-328bd31b664e)

### NuGet package version

WinUI 3 - Windows App SDK 1.6.5: 1.6.250205002

### Windows version

Windows 11 (24H2): Build 26100

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the supplied CheckBox XAML snippet using WinUI 3 and Windows App SDK 1.6.5, comparing the Foreground value before and after checking it. Trace the CheckBox control styling or template behavior and verify that the red foreground remains visible in both checked and unchecked states.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.