Roberto Salemi

Roberto Salemi

  • NA
  • 146
  • 136.8k

[WPF] DataGrid Cell Style: Textdecoration Strikethrough

Apr 17 2015 9:57 AM
Hi,
I'm using DataTriggers for change the Text Style in cells where property IsDeletedItem becames true.

In my datagrid I added:
<DataGrid.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsDeletedItem}" Value="True">
<Setter Property="TextBlock.TextDecorations" Value="Strikethrough" />
<Setter Property="FontSize" Value="22" />
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.CellStyle>

The FontSize of text is changed, but the text decorations is not applied.

Why?

Thanks.

Answers (3)