microsoft / microsoft/microsoft-ui-xaml

The context menu in AutoSuggestBox doen't update text colors when the system theme changes

Open
#10,485 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-AutoSuggestBox bug
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

Describe the bug

I'm currently using WinAppSDK version 1.6.241106002, however, this bug can also be reproduced in the WinUI 3 Gallery app.

My system is set to dark theme, and this is the text color of the context menu in AutoSuggestBox (right click on typing area to open the context menu):
Image

When changing the system theme to light, the text colors aren't updated to match the new theme, as seen below:
Image

This bug can also be reproduced in the TextBox component.

Steps to reproduce the bug
  1. Create an AutoSuggestBox.
  2. Type something in it.
  3. Right-click on the typing area to open the context menu (colors will match the system theme).
  4. Change the system theme.
  5. Right-click on the typing area again to open the context menu (colors will still correspond to the previous theme).
Expected behavior

Text colors should be updated correctly to match theme changes.

Screenshots

No response

NuGet package version

None

Windows version

Windows 11 (23H2): Build 22631

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with an AutoSuggestBox or TextBox in the WinUI 3 Gallery on Windows 11, switching from dark to light theme and reopening the context menu. Trace the control's context-menu text coloring and verify that newly opened menus match the current system theme.

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
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.