# TextViewGenerator.AllowUndo Property

> Gets or sets a value indicating whether the undo buffer is active or not.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 21.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.AllowUndo Property
- **477 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/allowundo-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/allowundo-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/textviewgenerator/allowundo-property/llms-full.txt

---

### Description

Gets or sets a value indicating whether the undo buffer is active or not.

### Syntax

```csharp
public bool AllowUndo { get; set; }
```

```vbnet
Public Property AllowUndo As Boolean
```

### Examples

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

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

textViewGenerator.AllowUndo = true;
if (textViewGenerator.AllowUndo)
{
    Console.WriteLine("Text View Generator: Allow Undo is enabled.");
}
```

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

textViewGenerator.AllowUndo = True
If textViewGenerator.AllowUndo Then
    Console.WriteLine("Text View Generator: Allow Undo is enabled.")
End If
```

---

## Nearby

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