UWP 删除线 [英] UWP Strikethrough
本文介绍了UWP 删除线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 UWP 应用中使用删除线.例如:£100 £90 立减 10%."建议似乎是使用 TextDecorations,它在 2012 年仍然不可用(link).请问现在是否可以在 TextBlock 中使用删除线?
I'd like to use strikethrough in a UWP app. For example: '10% off £100 £90.' The advice seems to be to use TextDecorations, which in 2012 was still not available (link). Please can you tell me if it's possible to use strikethrough in a TextBlock now?
推荐答案
根据官方 文档,删除线是可用的 TextDecoration.
According to the offical documentation, strikethrough is an available TextDecoration.
一个 XAML 示例:
An XAML-Example:
<!-- Use the default font values for the strikethrough text decoration. -->
<TextBlock
TextDecorations="Strikethrough"
FontSize="36" >
The quick red fox
</TextBlock>
我自己在 UWP 应用程序中测试了该示例,没有任何问题.
I tested the example by myself in an UWP-Application and had no problems.
Rob 是如何提到的:
从 v10.0.15063.0 开始可用.
How Rob mentioned:
It is available since v10.0.15063.0.
这篇关于UWP 删除线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文