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

SystemAccentColor #2

Open
MajorXAML opened this issue Jan 3, 2022 · 1 comment
Open

SystemAccentColor #2

MajorXAML opened this issue Jan 3, 2022 · 1 comment

Comments

@MajorXAML
Copy link

Hi!
Any idea how to get SystemAccentColor in Windows 11?

I mean these:
SystemAccentColorLight3
SystemAccentColorLight2
SystemAccentColorLight1
SystemAccentColorDark1
SystemAccentColorDark2
SystemAccentColorDark3

@Difegue
Copy link
Owner

Difegue commented Jan 3, 2022

As far as I know, you can use the UISettings WinRT class directly in WPF, and that allows you to get values for UWP resource keys like those.

See ModernWpf's ColorsHelper for an existing WPF implementation: https://github.com/Kinnara/ModernWpf/blob/master/ModernWpf/Helpers/ColorsHelper.cs.
(I recommend looking at ModernWpf for basically anything! It's quite complete and a bummer it's not currently being updated for Win11 styling. 😭)

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

2 participants