We have an application with certain behaviors that require modifying the document model directly. Doing this clears the undo stack. Is there any way that we can hook into the document undo stack so that we can support undoing our custom actions to the document?
1 Answer, 1 is accepted
0
Mihail
Telerik team
answered on 22 Nov 2016, 09:31 AM
Hello Chris,
The undo stack will preserve actions only executed by the RadRichTextBox commands. I am afraid that it is not possible to preserve direct modification as an undo action.
Nevertheless, the commands should be able to execute all kinds of actions in order to modify the document in a state that should be suitable for your scenario. In addition, there are undo groups which are designed to combine multiple commands into a single undo group. Here is example of this functionality could be used:
And here is a link to the RadDocumentEditor help with more examples.
If this approach is not suitable for your scenario you could provide more details on what you are trying to achieve. This way we will be able to provide you with the best solution for your specific case.
Regards,
Mihail
Telerik by Progress
Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.