I have a WPF Window with a Ribbon
with a dark background color (SolidColorBrush
)
I have set the font color of the tabs to white, but that's not readable in the selected tab. So I would like to have a black background in the selected tab (or a black font color would also work). My app.xaml contains this code to style it:
<Application.Resources>
<ResourceDictionary>
<Style x:Key="SelectedRibbonTab" TargetType="RibbonTab">
<Setter Property="Background" Value="Black"></Setter>
</Style>
<Style TargetType="RibbonTab">
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="HeaderStyle" Value="{DynamicResource SelectedRibbonTab}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="RibbonTabHeader">
<Setter Property="Foreground" Value="White"></Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
It is clearly not working, any solutions how I can fix this?