TX Text Control .NET Server

BeginUndoAction Method

Method|Introduced in 23.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Begins a user-defined undo operation. All editing and fomatting changes made between BeginUndoAction and EndUndoAction belong to the undo operation. These changes are undone or redone in a single step. The specified user-defined name is available with the UndoActionName property.

Syntax

public void BeginUndoAction(string actionName);

Parameters

ParameterDescription
actionName

Specifies the undo action's name. If an action name is not necessary, this parameter can be null or an empty string.

Examples

The following example applies bold formatting through the text view generator's selection by using TextViewGenerator.BeginUndoAction.

Selection formattedSelection = textViewGenerator.Selection;
formattedSelection.Bold = true;
textViewGenerator.Selection = formattedSelection;

textViewGenerator.BeginUndoAction("CustomerName");
Console.WriteLine("Text View Generator is ready for use.");