Skip to content

[Bug]: SystemTrayIcon does not sync with mainwindow theme even I tracked mainwindow already in app.xaml.cs #154

@hoshiizumiya

Description

@hoshiizumiya

Describe the bug

https://github.com/ghost1372/DevWinUI/blob/main/dev/DevWinUI/Common/TrayIcon/SystemTrayIcon.cs

Steps to reproduce the bug

If the main window theme(Dark/Light) is not the same as system. The Systemtrayicon is always follow with the system settings. There is the picture like:

Image As shown in the screenshots, the MenuFlyoutSubItem does not appear when using a Flyout instead of a MenuFlyout in the XAML file. Additionally, I don't understand why the theme for the three buttons in the top-right corner is incorrect. I used DevWinUI for all related situation. These screenshots may help identify the issue (I've bound the SystemTrayIcon to the MainWindow). Image Image

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

Visual Studio 2026

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions