# TextControl.ClearUndo Method

> Clears the undo buffer of the Text Control.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 16.0
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > TextControl.ClearUndo Method
- **231 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/clearundo-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/clearundo-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/clearundo-method/llms-full.txt

---

### Description

Clears the undo buffer of the Text Control.

### Syntax

```csharp
public void ClearUndo();
```

```vbnet
Public Sub ClearUndo()
```

### Examples

The following example clears the undo history. The created object is then available to the surrounding document workflow.

```csharp
textControl.ClearUndo();
Console.WriteLine("Text Control is ready for use.");
```

```vbnet
textControl.ClearUndo()
Console.WriteLine("Text Control is ready for use.")
```

---

## Nearby

- **Previous:** [TextControl.Clear Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/clear-method/llms-full.txt)
- **Next:** [TextControl.CommentChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/commentchanged-event/llms-full.txt)
