We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Is it possible to save and restore the cursor (caret) position of RTF document?

Thread ID:





149734 Dec 6,2019 08:59 PM UTC Dec 11,2019 09:22 AM UTC WPF 4
Tags: RichTextBoxAdv
John Prass
Asked On December 6, 2019 08:59 PM UTC

I'm saving the contents of a RichTextBoxAdv as RTF, I would like to be able to restore the cursor to the position when re-loading this document.  Is this possible?

Thank you.

Premkumar Sundaramoorthy [Syncfusion]
Replied On December 9, 2019 06:01 PM UTC

Hi John, 
Thank you for using syncfusion product, 
The file format file (.rtf) should contains the content information alone. It won’t contain any information about application level information, for example cursor position selection highlight etc. Because it is differing for each viewer and editor. So, save and restore the cursor position is not possible.  
But as a workaround you can place the cursor at specific position on loading each document by holding the caret position in sample level. Now we are preparing the sample for the same will update the sample by 12/10/2019.  
Please let us know if you need any other question. 

Premkumar Sundaramoorthy [Syncfusion]
Replied On December 10, 2019 12:28 PM UTC

Hi John,

We have prepared the sample to demonstrate how to store and restore the cursor position on loading each document.

Sample link: https://www.syncfusion.com/downloads/support/forum/149734/ze/Restore_CaretPosition-632679514 

Please let us know if you have any other question.



John Prass
Replied On December 10, 2019 11:22 PM UTC

This workaround will work for me.  Thank you for your help.

Preethi Nesakkan Gnanadurai [Syncfusion]
Replied On December 11, 2019 09:22 AM UTC

Hi John, 
Most welcome. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon