I'm trying to change the style of a button as well as the style of a textblock included in the button via a binding without success. I want to get something like this:
I want change the TextBlock foreground color and the Button BorderThickness according to the binding.
Here is my code :
<Button Name="WeldHistory"
Margin="20,0,20,0"
VerticalAlignment="Stretch"
Height="auto"
Background="{x:Null}"
BorderBrush="{StaticResource RedPolysoudeNormalBrush}"
BorderThickness="0 0 0 3"
Command="{Binding ScreenWeldHistoryCommand}" >
<Button.ContentTemplate>
<DataTemplate>
<TextBlock Text="{x:Static lang:UI_Text.SCREEN_PROGRAM_LIBRARY}" Typography.Capitals="AllSmallCaps" Typography.CapitalSpacing="True">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsWeldHistoryActive}" Value="False">
<Setter Property="Foreground" Value="red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</DataTemplate>
</Button.ContentTemplate>

