在我的Windows Phone应用程序中,我想将TextDecorations.Strikethrough属性设置为RichTextbox元素,但我只能使用- run.TextDecorations = TextDecorations.Underline;
但我非常需要加删除线的文本。我怎么能拥有它呢?
发布于 2012-05-31 23:01:26
不支持删除线。如果你需要这样做,你必须自己在文本上画一条线。
发布于 2013-06-19 19:19:23
不支持删除线,您必须滚动您自己的。下面是一些示例代码,但它远远不是一个正确的实现。(不支持包装等)
<Grid>
<TextBlock Name="txtTask" TextAlignment="Center" VerticalAlignment="Center" Text="[Task]" Margin="0,0,2,1" Height="13.2" />
<Border x:Name="brdStrikeOut" BorderThickness="0,1,0,0" BorderBrush="{Binding ElementName=txtTask, Path=Foreground}" VerticalAlignment="Center"/>
</Grid>干杯雅克
https://stackoverflow.com/questions/10835533
复制相似问题