# TextViewGenerator.EndUndoAction Method

> Ends 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.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.ServerVisualisation`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.ServerVisualization > TextViewGenerator.EndUndoAction Method
- **420 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/endundoaction-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/endundoaction-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/endundoaction-method/llms-full.txt

---

### Description

Ends a user-defined undo operation. All editing and fomatting changes made between [BeginUndoAction](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/beginundoaction-method/llms-full.txt) and EndUndoAction belong to the undo operation. These changes are undone or redone in a single step.

### Syntax

```csharp
public void EndUndoAction();
```

```vbnet
Public Sub EndUndoAction()
```

### Examples

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

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

textViewGenerator.EndUndoAction();
Console.WriteLine("Text View Generator is ready for use.");
```

```vbnet
Dim formattedSelection As Selection = textViewGenerator.Selection
formattedSelection.Bold = True
textViewGenerator.Selection = formattedSelection

textViewGenerator.EndUndoAction()
Console.WriteLine("Text View Generator is ready for use.")
```

---

## Nearby

- **Previous:** [TextViewGenerator.EditMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/editmode-property/llms-full.txt)
- **Next:** [TextViewGenerator.FootnoteReferenceMarkEntered Event](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/footnotereferencemarkentered-event/llms-full.txt)
