如何制作 MaterialDesignInXamlToolkit 自定义颜色主题? [英] How make MaterialDesignInXamlToolkit Custom Color Theme?
本文介绍了如何制作 MaterialDesignInXamlToolkit 自定义颜色主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须使用自定义重点和主要调色板制作个人 colot 主题.
I have to make a personal colot theme with custom accent and primary color palette.
是否可以使用新的自定义调色板在我的项目中创建资源字典?
Is possible to create a resource dictonary in my project with new custom palette?
你能给我看一个样品吗?
Can you show me a sample?
最好的问候
佛朗哥
推荐答案
要创建自定义调色板,请在 App.xaml 中手动定义画笔,例如:
To create a custom palette, define your brushes manually in your App.xaml e.g.:
<!-- primary hues -->
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="LightBlue"/>
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="Black"/>
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="Blue"/>
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="White"/>
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="DarkBlue"/>
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="White"/>
<!-- accent -->
<SolidColorBrush x:Key="SecondaryAccentBrush" Color="Yellow"/>
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="Black"/>
在此示例中,您不会合并来自颜色程序集的两个调色板.
In this example you wouldn't merge in your two palettes from the Colors assembly.
有关更多信息,请参阅:
For more information see:
https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/wiki/Custom-调色板色调
这篇关于如何制作 MaterialDesignInXamlToolkit 自定义颜色主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文