# TXDrawingControl.ShapeDeleted Event

> Occurs when a shape has been deleted from the TX Drawing Control's shapes collection. It occurs by cutting or using the shape collection's Remove, RemoveAt or Clear method. The event handler receives an argument of type ShapeEventArgs containing data related to this event.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 19.0
- **Namespace:** `TXTextControl.Drawing`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDrawing.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDrawing.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Drawing > TXDrawingControl.ShapeDeleted Event
- **438 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeleted-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeleted-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeleted-event/llms-full.txt

---

### Description

Occurs when a [shape](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shape/llms-full.txt) has been deleted from the [TX Drawing Control](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/llms-full.txt)'s [shapes collection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapes-property/llms-full.txt). It occurs by [cutting](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/cut-method/llms-full.txt) or using the shape collection's [Remove](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shapecollection/remove-method/llms-full.txt), `RemoveAt` or `Clear` method. The event handler receives an argument of type [ShapeEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shapeeventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event ShapeEventHandler ShapeDeleted;
```

```vbnet
Public Event ShapeDeleted As ShapeEventHandler
```

### Examples

The following example records useful context when shape deleted occurs.

```csharp
tXDrawingControl.ShapeDeleted += (sender, e) =>
{
    Console.WriteLine($"Shape Deleted at {DateTime.Now:u}");
};
```

```vbnet
AddHandler tXDrawingControl.ShapeDeleted,
    Sub(sender, e)
        Console.WriteLine($"Shape Deleted at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [TXDrawingControl.ShapeCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapecreated-event/llms-full.txt)
- **Next:** [TXDrawingControl.ShapeDeselected Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeselected-event/llms-full.txt)
