This is a migrated thread and some comments may be shown as answers.

RadRichTextBox Document ContentStart

1 Answer 135 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 05 Nov 2014, 03:04 PM
Hi there, im trying to do a text range on a RadRichTextBox is there anyway to get the Document ContentStart?  e.g

TextRange range = new TextRange(RadRichTextBox.Document.ContentStart, CaretPosition);

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 07 Nov 2014, 01:57 PM
Hello Sam,

Here is how you can create a document position and move it to the start of the document.
DocumentPosition documentStart = new DocumentPosition(this.radRichTextBox.Document);
documentStart.MoveToFirstPositionInDocument();
There are some other handy method of the DocumentPosition class that you can check in the API Reference.

I hope this help.

Regards,
Petya
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
RichTextBox
Asked by
Sam
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or