How to update undo stack?

I used this to add text to RichTextBox programmatically.

public static void AddText(this ParagraphAdv paragraph, string text)
{
    for (int i = 0; i < text.Length; i++)
        paragraph.Inlines.Add(new SpanAdv { Text = text[i].ToString() });
}

I pressed Ctrl + Z  to undo, but failed.

1 Reply 1 reply marked as answer

PS Premkumar Sundaramoorthy Syncfusion Team November 7, 2020 03:44 AM UTC

Hi Ziyue,

Thanks for contacting Syncfusion support,

The SfRichTextBoxAdv provides history preservation support for each editing operation performed against its document content through UI. It won’t record the programmatic changes performed against its document.

https://help.syncfusion.com/wpf/richtextbox/undo-redo

Please let us know if you have any other questions.


Regards, 

Premkumar  


Marked as answer
Loader.
Up arrow icon