【发布时间】:2017-12-16 16:05:46
【问题描述】:
我使用 MetroDark 主题。
我在 xaml 中使用此代码:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Theme/MetroDark/MetroDark.MSControls.Core.Implicit.xaml" />
<ResourceDictionary Source="Theme/MetroDark/MetroDark.MSControls.Toolkit.Implicit.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Label}" >
<Setter Property="FontFamily" Value="B titr" />
<Setter Property="FontSize" Value="13" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
<Style TargetType="{x:Type TextBox}" >
<Setter Property="FontFamily" Value="B Nazanin" />
<Setter Property="FontSize" Value="16" />
<Setter Property="FontWeight" Value="Bold" />
</Style>
</ResourceDictionary>
</Application.Resources>
字体系列已正确更改,但背景颜色也已更改。
我只想更改字体系列和字体大小,以及另一个属性(例如:背景、边框等)并从默认主题(MetroDark)中获得效果。
我该怎么做?
【问题讨论】:
标签: c# wpf xaml element font-family