Quantcast
Channel: Active questions tagged strikethrough - Stack Overflow
Viewing all articles
Browse latest Browse all 88

Wpf change color of strikethrough in datatrigger

$
0
0

I have two strikethrough datatrigger, one of them I want to be the color black (default), but one of them should be Strikethrough red, can someone help me with the red color, this is my code:

<TextBlock Name="Number" Grid.Column="0" Text="{Binding Number}"/><TextBlock Name="Name" Grid.Column="1" Text="{Binding Name}"/><TextBlock Name="Price" Grid.Column="0" Text="{Binding Price}"/><TextBlock Name="Stock" Grid.Column="1" Text="{Binding Stock}"/><DataTrigger Binding="{Binding IsStrikethroughRed}" Value="True"><Setter TargetName="Number" Property="TextBlock.TextDecorations" Value="Strikethrough"/><Setter TargetName="Name" Property="TextBlock.TextDecorations" Value="Strikethrough"/><Setter TargetName="Price" Property="TextBlock.TextDecorations" Value="Strikethrough"/><Setter TargetName="Stock" Property="TextBlock.TextDecorations" Value="Strikethrough"/>    </DataTrigger>

Viewing all articles
Browse latest Browse all 88

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>