Skip to content

Custom palette hues using CustomColorTheme with hex color #3830

Answered by Keboo
97gg asked this question in Q&A
Discussion options

You must be logged in to vote

@97gg yes, though you will need to do it in C# rather than in XAML.
What you want to do is leverage the PaletteHelper.GetTheme() or more generically ResourceDictionaryExtensions.GetTheme() extension method. These methods will return back the current Theme object. This class has all of the theme colors and you can then make any modifications to them that you wish. Once you are done, to apply the updated theme, you will need to call PaletteHelper.SetTheme() or ResourceDictionaryExtensions.SetTheme(). These methods will set the XAML resources.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by 97gg
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants