我想将一个TextDecorations.Strikethrough装饰按钮添加到我的自定义RichTextBox中,我使用下面的代码来添加和删除TextDecoration。问题是,当我选择一个比划过的范围更大的范围并单击"StrikeThrough“按钮时,我将得到一个InvalidCastException: Unable to cast object of typetdc.Equals(TextDecorations.Strikethrough)) tdc = TextDecor
我想使用NSAttributedString创建NSRegularExpression我只需要一种模式的bold 或 italic 或 strikethrough更新案例1:
let string = "~This two~ are *bold text*and different <textcolor> and ~strikethro
我将文本设置为Underline或not、Strikethrough或not。 if (this.IsStrikethrough) this.MyTextBlock.TextDecorations.Add(TextDecorations.Strikethrough); else foreach (var item in TextDecorations.Strikethr