This question is locked. New answers and comments are not allowed.
Hi,
I have written a function which takes a bookmark, highlights that bookmark then navigates to it. The only problem is, using previousbookmark doesn't remove the old highlighted text. So i end up with all the bookmarks highlighted. Any ideas as to what i'm missing.
if (previousbookmark != null)
{
this.radRichTextBox1.Document.Selection.Clear();
this.radRichTextBox1.Document.Selection.SelectAnnotationRange(previousbookmark);
this.radRichTextBox1.ChangeTextHighlightColor(Colors.Transparent);
}
I have written a function which takes a bookmark, highlights that bookmark then navigates to it. The only problem is, using previousbookmark doesn't remove the old highlighted text. So i end up with all the bookmarks highlighted. Any ideas as to what i'm missing.
void NavigateAndHighLightBookMark(BookmarkRangeStart bookmark)
{if (previousbookmark != null)
{
this.radRichTextBox1.Document.Selection.Clear();
this.radRichTextBox1.Document.Selection.SelectAnnotationRange(previousbookmark);
this.radRichTextBox1.ChangeTextHighlightColor(Colors.Transparent);
}
this.radRichTextBox1.Document.Selection.SelectAnnotationRange(bookmark);
this.radRichTextBox1.ChangeTextHighlightColor(Colors.LightGray);
this.radRichTextBox1.Document.GoToBookmark(bookmark);
previousbookmark = bookmark;
}
Thanks.