开发者

I want to strikeout the contents of a xamdatagrid in MVVM model

开发者 https://www.devze.com 2022-12-10 09:01 出处:网络
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.

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. 开发者_开发百科


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消