-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetWindowThemeWpf: different themes for different windows? #7
Comments
Thanks for the library and write-up of how this all works! Implementing dark mode in WPF is surprisingly difficult, your approach was the only one i was able to fit into my app while understanding what it does |
This symptom seems to usually be caused by a missing call to I was able to make the WPF demo app show two In case it helps, here is the source and binary for the modified WPF demo app with my above changes. |
Yea, call |
Looks like it's not possible now:
I'll try to hack a manager for window scope... |
Yeah |
I see that you intentionally stayed away from style management in this project, and i understand why! it must be another level of madness :) Maybe this limitation is worth mentioning in readme? |
Yeah the client area can get pretty complex, especially with controls like the WPF DataGrid. But most of all, it's subjective how these controls should look in dark mode, highly dependent on existing app styles, and best left to the developers or their chosen UI libraries (MahApps, Telerik UI, etc) about how it should look, I think. The SkinManager is definitely a limited example implementation of how to swap resource dictionaries that I added because I realized I was copying common boilerplate between multiple projects. I like your suggestion to clarify its functionality and limitations in the readme and code documentation comments. |
…ifferent windows? [appears to work, API is neither documented nor finalized]
Hello. I am trying to open two WPF windows (of the same type) and make them use different themes, to see them live and side by side - this way it's easier to spot style differences. Because applying/comparing themes in design time is not very convenient. I don't really care about style of the window itself, i will be happy to load dark and light style for content.
I can't find a way that, however. My observations:
SetWindowThemeWpf
in window constructor, after InitializeComponent, does nothing visibleSetCurrentProcessTheme
SetWindowThemeWpf
as it's suggested in docs, later, eg with a button click, does nothingSetCurrentProcessTheme
anytime changes the theme for all windowsThe text was updated successfully, but these errors were encountered: