# TXDrawingControl.CanUndo Property

> Gets a value indicating whether the user can undo the previous operation in the TX Drawing Control.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **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.CanUndo Property
- **313 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/canundo-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/canundo-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/canundo-property/llms-full.txt

---

### Description

Gets a value indicating whether the user can [undo](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/undo-method/llms-full.txt) the previous operation in the [TX Drawing Control](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/llms-full.txt).

### Syntax

```csharp
public bool CanUndo { get; }
```

```vbnet
Public ReadOnly Property CanUndo As Boolean
```

### Examples

The following example checks can undo before performing the related operation.

```csharp
if (tXDrawingControl.CanUndo)
{
    tXDrawingControl.Undo();
}
```

```vbnet
If tXDrawingControl.CanUndo Then
    tXDrawingControl.Undo()
End If
```

### Limitations

Read only.

---

## Nearby

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