我有来自MahApps Metro的MetroAnimatedSingleRowTabControl
。我想将标题的foregorund颜色从蓝色(由模板定义)更改为白色。
这就是我所拥有的:
<Grid x:Name="Body" Grid.Row="1" Margin="20,0,20,0">
<controls:MetroAnimatedSingleRowTabControl>
<controls:MetroAnimatedSingleRowTabControl>
<controls:MetroTabItem Header="Server"/>
</controls:MetroAnimatedSingleRowTabControl>
</controls:MetroAnimatedSingleRowTabControl>
</Grid>
我想让Server
标题以白色显示。
答案 0 :(得分:4)
颜色在触发器中设置为TabItem template。
获得密钥后,您可以覆盖资源绑定
<Grid x:Name="Body" Grid.Row="1" Margin="20,0,20,0">
<Controls:MetroAnimatedSingleRowTabControl>
<Controls:MetroAnimatedSingleRowTabControl.Resources>
<SolidColorBrush x:Key="AccentColorBrush" Color="Red"/>
<SolidColorBrush x:Key="HighlightBrush" Color="Orange"/>
</Controls:MetroAnimatedSingleRowTabControl.Resources>
<Controls:MetroTabItem Header="Server"/>
</Controls:MetroAnimatedSingleRowTabControl>
</Grid>