# TXDrawingControl.ClearUndo Method

> Clears the undo buffer of the TX Drawing Control.

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

---

### Description

Clears the undo buffer of the [TX Drawing Control](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/llms-full.txt).

### 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
tXDrawingControl.ClearUndo();
Console.WriteLine("TXDrawing Control is ready for use.");
```

```vbnet
tXDrawingControl.ClearUndo()
Console.WriteLine("TXDrawing Control is ready for use.")
```

---

## Nearby

- **Previous:** [TXDrawingControl.Changed Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/changed-event/llms-full.txt)
- **Next:** [TXDrawingControl Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/constructor/llms-full.txt)
