TX Text Control .NET for Windows Forms

AddUndoUnit Method

Method|Introduced in 23.0
Namespace
TXTextControl.DataVisualization
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Add the current state of the drawing which is connected with this DrawingFrame to the undo stack. Programmatic changes performed with the drawing's properties and methods are not automatically added to a TextControl's undo stack. Calling this method is not necessary, when the drawing frame's layout in the text is changed.

Syntax

public void AddUndoUnit();

Examples

The following example adds the current drawing frame change to the undo history. The created object is then available to the surrounding document workflow.

drawingFrame.AddUndoUnit();
Console.WriteLine("Drawing Frame is ready for use.");