WPFToolkit.Extended RichTextBox run time format [closed]
I required to format text in RichTextBox
at runtime, i.e. make selected text bold at runtime.
You can use the ApplyPropertyValue() method:
TextSelection selection = yourRichTextBox.Selection;
if (!selection.IsEmpty) {
selection.ApplyPropertyValue(TextElement.FontWeightProperty,
FontWeights.Bold);
}
精彩评论