Skip to content

Setting Dark mode from Settings Page makes the Minimize, Maximize, and Close buttons invisible. #4716

@Omenrevlis

Description

@Omenrevlis

Describe the bug

In Navigation Template I added the settings. By default, it implements the ability to switch the app to Dark, Light, or Default. When I change it to Dark the Mininimize, Maximize, and Close buttons are still set to forground black and are invisible unless you hover over them.

I have not modified the toolbar from what the template created.
I have not messed with setting any colors of anything. This is how it is after the template studio created it.

To Reproduce

  1. Create a Navigation based Template project
  2. Add a Settings page
  3. Make sure your computer is set to light mode
  4. Run the application
  5. Go to the settings page
  6. Change to Dark Mode (application only)

Additional context

I see where the TitleBarHelper and the ShellPage CS sets the forcolor. Interestingly, if I put a breakpoint in either and run debug to the breakpoint, then just continue running, the title bar foreground is correct.

So something is changing it back to light foreground settings, likely on another thread, but I'm not sure where.

When the main window is deactivated, you can see greyish buttons. But when the windows is active, they are the same color as the title bar (black) and cannot be seen.

Light Mode
Not active window
Acitve window

Applies to the following platforms:

  • WinUI
  • WPF
  • UWP

About your setup

  • Visual Studio Version: Version 17.8.0 Preview 7.0
  • Template Studio Wizard Version: v5.4
  • Windows Build: Windows 11 Pro - 10.0.22621

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue relates to the wizard not working or a problem with the generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions