//通过代码来设置选中文字的样式代码:
RichTextBox1.Selection.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Red); //改变前景色 RichTextBox1.Selection.A
RichTextBox1.Selection.ApplyPropertyValue(TextElement.ForegroundProperty, Brushes.Red); //改变前景色 RichTextBox1.Selection.A