tags:

views:

101

answers:

2

I want to strikeout the contents of a xamdatagrid in MVVM model.I am using TextBlock.Textdecoration="Strikethrough" but it is not working.Can anyone please give me the solution.

A: 

Where are you using it? In C# code behind or XAML?

In XAML, it should be:

<TextBlock TextDecorations="Strikethrough">Sample text</TextBlock>

In C#, it should be:

textBlock1.TextDecorations = TextDecorations.Strikethrough;

I am not sure why u cannot get it work.

redjackwong
Waht you said is working.But it is not working when I put it as a style in xamdatagrid resources..I am doing this in Xaml <Style TargetType="{x:Type igDP:DataRecordCellArea}"> <Setter Property="TextBlock.TextDecorations" Value="Strikethrough"></Setter> <Setter Property="TextBlock.FontStyle" Value="Italic"></Setter> </Style>
Richa Agarwal
A: 

What you said is working.But it is not working when I put it as a style in xamdatagrid resources..I am doing this in Xaml

Richa Agarwal