This code snippet comes from RichEditBox
style application,
Document.Selection.SetRange(paragraphStartIndex, paragraphStartIndex + data.Text.Length);
Document.Selection.CharacterFormat.Strikethrough = FormatEffect.On;
However, can we do similar things with a RichTextBlock
?
I know that I can add a <run>
or a <Span>
and add style information to these elements, but is there any way to grab the whole RichTextBlock
content and apply style to a range of text within it?