RadRichTextBox Document ContentStart

2 posts, 0 answers
  1. Sam
    Sam avatar
    1 posts
    Member since:
    Jan 2014

    Posted 05 Nov 2014 Link to this post

    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);

  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 07 Nov 2014 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top