Hello Chris,
The code block you have pasted actually clears the selection and highlights the line that the caret is currently positioned in.
(I assume that by
you mean
as there is no ChangeTextBackColor(Color color) method in RadRichTextBox's API.)
If you want to change the highlight color of the selected text, the following line is sufficient, as this method operates on the selected text:
You can also use the command that RadRichTextBoxRibbonUI exposes and bind the command as shown in our demo:
(Note that the whole RichTextBoxRibbonUI's DataContext is bound to the Commands property of RadRichTextBox.)
The InsertInline(Inline inline) method of RadRichTextBox inserts the inline at the current CaretPosition. If there is selected text, it is replaced. You can, however, manipulate the CaretPosition and the selection in code-behind to adapt this behavior to match your needs.
If you have any other questions, do not hesitate to contact us again.
Kind regards,
Iva
the Telerik team
Browse the
videos here>> to help you get started with RadControls for Silverlight