Q1 2012
VS 2010
The following snippet does not run.
private void HightlightText(string textToHighlight){ DocumentTextSearch search = new DocumentTextSearch(this.radRichTextBox.Document); foreach (var textRange in search.FindAll(textToHighlight)) { this.radRichTextBox.Document.Selection.AddSelectionStart(textRange.StartPosition); this.radRichTextBox.Document.Selection.AddSelectionStart(textRange.EndPosition); this.radRichTextBox.ChangeTextHighlightColor(Color.Red); }}How can I highlight with red color all the occurrences of the text?
Tommaso