E
E
Evgeny Ivanov2021-06-07 12:40:49
C++ / C#
Evgeny Ivanov, 2021-06-07 12:40:49

How to change color/theme in MaterialDesignThemes?

VS2019 XAML
Working with MaterialDesignThemes.

App.xaml Code

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />-->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.LightBlue.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>


I now have the color of buttons, fields, etc. lightblue. How can I change the color?
How can I find out the list of all colors in order to choose the right one?

While I do only at random
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Red.xaml" />

I get red (Red) buttons.

There are such things on the Internet
https://www.materialui.co/colors
They give color in hex format. How to use it?

How to change color/theme in MaterialDesignThemes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2021-06-08
@logpol32

https://github.com/MaterialDesignInXAML/MaterialDe... that's all for you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question