27 lines
1.8 KiB
XML
27 lines
1.8 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||
<!-- 1. 引入所有基础资源,这样我们才能引用它们 -->
|
||
<ResourceDictionary.MergedDictionaries>
|
||
<ResourceDictionary Source="AntDesignColors.xaml"/>
|
||
<ResourceDictionary Source="Light.xaml"/>
|
||
<!-- 我们以亮色主题为设计时默认中性色 -->
|
||
</ResourceDictionary.MergedDictionaries>
|
||
|
||
<!-- 2. 为所有功能色提供一个固定的默认值 -->
|
||
<!-- 我们以“拂晓蓝”作为设计时的默认色系 -->
|
||
|
||
<!-- 从 AntDesignColors.xaml 中引用具体的颜色来定义画刷 -->
|
||
<SolidColorBrush x:Key="Primary" Color="{StaticResource AntDesign.Color.Blue6}" />
|
||
<SolidColorBrush x:Key="PrimaryForeground" Color="#FFFFFF" />
|
||
<SolidColorBrush x:Key="InfoBackground" Color="{StaticResource AntDesign.Color.Blue1}" />
|
||
<SolidColorBrush x:Key="InfoForeground" Color="{StaticResource AntDesign.Color.Blue7}" />
|
||
|
||
<!-- 你需要在这里为你所有在UI中用到的语义化Key提供一个默认值 -->
|
||
<!-- 例如,如果还有Success, Warning等,也在这里定义 -->
|
||
<SolidColorBrush x:Key="SuccessBackground" Color="{StaticResource AntDesign.Color.Green1}" />
|
||
<SolidColorBrush x:Key="SuccessForeground" Color="{StaticResource AntDesign.Color.Green7}" />
|
||
<SolidColorBrush x:Key="WarningBackground" Color="{StaticResource AntDesign.Color.Gold1}" />
|
||
<SolidColorBrush x:Key="WarningForeground" Color="{StaticResource AntDesign.Color.Gold7}" />
|
||
<SolidColorBrush x:Key="ErrorBackground" Color="{StaticResource AntDesign.Color.Red1}" />
|
||
<SolidColorBrush x:Key="ErrorForeground" Color="{StaticResource AntDesign.Color.Red7}" />
|
||
</ResourceDictionary> |