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
2009-11-04 07:32:50
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
2009-11-04 09:46:44
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
2009-11-04 09:48:07