# TXDrawingControl.ShapeDeselected Event

> Occurs when a shape has been deselected. It occurs by removing a shape from the TXDrawingControl.Selection.Shapes property or, if the number of selected shapes is greater than 0, clicking on a location inside the TX Drawing Control where no shape is located. 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:** 23.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.ShapeDeselected Event
- **410 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeselected-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeselected-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeselected-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 deselected. It occurs by removing a shape from the [TXDrawingControl.Selection.Shapes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/selection/shapes-property/llms-full.txt) property or, if the number of selected shapes is greater than 0, clicking on a location inside the [TX Drawing Control](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/llms-full.txt) where no shape is located. 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 ShapeDeselected;
```

```vbnet
Public Event ShapeDeselected As ShapeEventHandler
```

### Examples

The following example records useful context when shape deselected occurs.

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

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

---

## Nearby

- **Previous:** [TXDrawingControl.ShapeDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapedeleted-event/llms-full.txt)
- **Next:** [TXDrawingControl.ShapeFlipped Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapeflipped-event/llms-full.txt)
