Color Tool
#3327
Replies: 1 comment
-
Serialize the selected color scheme into a persistent format such as JSON or XML. Example: if (File.Exists("colorscheme.json"))
{
var json = File.ReadAllText("colorscheme.json");
var colorScheme = JsonSerializer.Deserialize<ColorScheme>(json);
var resources = Application.Current.Resources;
resources["PrimaryColor"] = new SolidColorBrush(Color.Parse(colorScheme.Primary));
resources["SecondaryColor"] = new SolidColorBrush(Color.Parse(colorScheme.Secondary));
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
One feedback:
Some color names were changed and invalid, and so the color tool is blank on demo.
One question:
How can I save the color scheme? UI apply the saved scheme in next start up.
Beta Was this translation helpful? Give feedback.
All reactions