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

Adjust undo granularity?

3 Answers 26 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 27 Sep 2019, 05:39 PM

The undo stack for editing in the rich text box is way too high. Even when typing very quickly with no pauses whatsoever, it has a separate entry for nearly every single letter. Word (and even WordPad) does a much better job at this, only breaking up entries if you pause. Is there any way to adjust this?

 

3 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 02 Oct 2019, 10:28 AM

Hello Steve,

The actions are included in the Undo stack when a command executes. You could decrease the frequency of the commands executing but this will affect the user experience when editing the document. For example, when writing text into the document, the user will see the input with some delay and the inserted letters will be visualized on a bunch of several.

In case this would be the preferred behavior in this scenario, you will need to inherit the Caret class and override the MinimumTextInsertedInterval property. An example of how to create a custom caret is available in our GitHub repository: https://github.com/telerik/xaml-sdk/tree/master/RichTextBox/CustomCaret.

Hope this information is helpful.

Regards,
Tanya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Steve
Top achievements
Rank 1
answered on 02 Oct 2019, 10:24 PM
The delay was not tolerable, but I was able to use the example concept of a custom caret to begin and end groups based on a timer to accomplish close to what I wanted.
0
Tanya
Telerik team
answered on 03 Oct 2019, 11:35 AM

Hello Steve,

Thank you for sharing that. I am glad to hear that you have found an approach to achieve the desired behavior.

Regards,
Tanya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RichTextBox
Asked by
Steve
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Steve
Top achievements
Rank 1
Share this question
or