# TXDrawingCore.ShapeDeleted Event

> Occurs when a shape has been deleted from the TXDrawingCore'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.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDrawing.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Drawing > TXDrawingCore.ShapeDeleted Event
- **435 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/shapedeleted-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/shapedeleted-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/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 [TXDrawingCore](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/llms-full.txt)'s [shapes collection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/shapes-property/llms-full.txt). It occurs by [cutting](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/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
tXDrawingCore.ShapeDeleted += (sender, e) =>
{
    Console.WriteLine($"Shape Deleted at {DateTime.Now:u}");
};
```

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

---

## Nearby

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