Skip to content
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

Create theme assembly matching Windows 11 msstyles? #7

Open
wjk opened this issue Jul 12, 2021 · 3 comments
Open

Create theme assembly matching Windows 11 msstyles? #7

wjk opened this issue Jul 12, 2021 · 3 comments

Comments

@wjk
Copy link
Contributor

wjk commented Jul 12, 2021

What the title says, really. When I run my carefully crafted PresentationTheme.Aero application on Windows 11, it looks very out-of-place since all of the common controls have had their theme bitmaps changed from their Windows 10 values. Being able to use this library to automatically have native-looking UI on both Windows 10 and Windows 11 would be really cool. Thanks!

(As a side note, you can easily check for Windows 11 by using the CurrentBuild value under the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion registry key. If this value is 22000 or greater, the computer is running Windows 11. If not, the computer is running some build of Windows 10. This value is not affected by manifest versioning elements or lack thereof AFAIK.)

@gix
Copy link
Owner

gix commented Jul 22, 2021

I didn't have the chance yet to install the preview. So you're saying the Win10 theme is not applied, and it looks like the standard WPF Aero2 theme? If it is, the OS detection probably fails (and might require an entry in the application manifest). You could try overriding this by using a custom theme policy (see PresentationTheme.Aero.AeroThemePolicy).

@wjk
Copy link
Contributor Author

wjk commented Jul 22, 2021

@gix What happens is that my Windows 11 system detects as Windows 10, and as such the Win10 Aero theme is used, and it looks very out-of-place compared to the other apps on the Windows 11 system. I mentioned the CurrentBuild bit because both Windows 10 and Windows 11 are NT 10.0 AFAIK, which is what is causing the confusion. Thanks!

@mdtauk
Copy link

mdtauk commented Jul 23, 2021

A new PresentationTheme needs to be made, which matches the look of the WinUI 2.6/Windows 11 controls - and then that is used by default for WPF apps running on Windows 11 (and possibly allowed as an Opt-In for apps running on Windows 10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants