# TXDrawingCore.ShapeDeselected Event

> Occurs when a shape has been deselected. It occurs by removing a shape from the TXDrawingCore.Selection.Shapes property or, if the number of selected shapes is greater than 0, clicking on a location inside the canvas 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 WPF
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Drawing`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl.Drawing > TXDrawingCore.ShapeDeselected Event
- **386 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapedeselected-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapedeselected-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapedeselected-event/llms-full.txt

---

### Description

Occurs when a [shape](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt) has been deselected. It occurs by removing a shape from the [TXDrawingCore.Selection.Shapes](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/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 canvas where no shape is located. The event handler receives an argument of type [ShapeEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/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
tXDrawingCore.ShapeDeselected += (sender, e) =>
{
    Console.WriteLine($"Shape Deselected at {DateTime.Now:u}");
};
```

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

---

## Nearby

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