BeginUndoAction Method
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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);Public Sub BeginUndoAction(actionName As String)Parameters
| Parameter | Description |
|---|---|
| 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.");Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection
textViewGenerator.BeginUndoAction("CustomerName")
Console.WriteLine("Text View Generator is ready for use.")