You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Public API Requirements : ThemeManager, ThemeMode ?? #8540
There are a few public API changes related to theme management for Fluent theme that may be needed in the future, but we are not set on what those APIs should be to make it feature complete.
Currently we have experimental ThemeMode APIs for Application and Window which are only Fluent specific and do not function for other themes. This needs to be changed and we need to find a better way to deal with theme and theme variants.
Previously there has been a lot of discussion on this topic on the following threads :
WPF may need some or most of these APIs, but that can be discussed only after we finalize the approach on how we are going to use Fluent as default theme.
When experimenting on net10 with FluentTheme I came to a point where I needed some way to
get notified on theme changes (when ThemeMode.System follows system settings)
convert ThemeMode.System to either light or dark for custom code behind
This is because some parts of our UI are not WPF (OpenGL rendering and OxyPlot) and I'd like to style those parts according to the application theme. Personally I love dark themes and use them everywhere - and I feel terrible because my own apps don't support it, yet :-)
It looks like ThemeManager.cs has some registry magic to do the latter. I didn't dig deep enough to find something for the first problem (quick google returned only terrible ideas). Keep up the good work on FluentTheme!
I honestly don't see the necessity for mirroring the complexity of WPF.UI (e.g., SystemThemeManager, SystemThemeWatcher, and multiple ThemeMode types). While WPF.UI is a great library, its approach to theme management is arguably over-engineered for a native integration into the WPF framework.
Why maintain two different ThemeManagers and two different ThemeModes when, in the end, it always boils down to two binary signals?
AppsUseLightTheme (from the Registry)
SystemParameters.HighContrast
To break down why the "System Theme" part of the current proposal is redundant:
Light/Dark: Both system and apps follow the global toggle.
Custom: Windows allows users to set the system mode to light while keeping the app mode dark. A WPF application should strictly follow the app mode.
High Contrast: This is already reliably handled by existing system parameters.
We should simplify the native API:
The application only needs to know if it should render in Light, Dark, or HC mode based on the user's app-specific preference.
But maybe i missed some important details and there is actually a good reason for it.
In that case, please enlighten me.
Activity
[-]Public API Changes[/-][+]ThemeManager, ThemeMode APIs[/+][-]ThemeManager, ThemeMode APIs[/-][+]Public API Requirements : ThemeManager, ThemeMode ??[/+]nzain commentedon Nov 22, 2025
When experimenting on net10 with FluentTheme I came to a point where I needed some way to
ThemeMode.Systemfollows system settings)ThemeMode.Systemto either light or dark for custom code behindThis is because some parts of our UI are not WPF (OpenGL rendering and OxyPlot) and I'd like to style those parts according to the application theme. Personally I love dark themes and use them everywhere - and I feel terrible because my own apps don't support it, yet :-)
It looks like ThemeManager.cs has some registry magic to do the latter. I didn't dig deep enough to find something for the first problem (quick google returned only terrible ideas). Keep up the good work on FluentTheme!
miloush commentedon Nov 22, 2025
As for theme change notifications, you can subscribe to SystemEvents.UserPreferenceChanged
Veritera commentedon Apr 23, 2026
I honestly don't see the necessity for mirroring the complexity of WPF.UI (e.g., SystemThemeManager, SystemThemeWatcher, and multiple ThemeMode types). While WPF.UI is a great library, its approach to theme management is arguably over-engineered for a native integration into the WPF framework.
Why maintain two different ThemeManagers and two different ThemeModes when, in the end, it always boils down to two binary signals?
AppsUseLightTheme(from the Registry)SystemParameters.HighContrastTo break down why the "System Theme" part of the current proposal is redundant:
Light/Dark: Both system and apps follow the global toggle.
Custom: Windows allows users to set the system mode to light while keeping the app mode dark. A WPF application should strictly follow the app mode.
High Contrast: This is already reliably handled by existing system parameters.
We should simplify the native API:
The application only needs to know if it should render in Light, Dark, or HC mode based on the user's app-specific preference.
But maybe i missed some important details and there is actually a good reason for it.
In that case, please enlighten me.