# TXDrawingControl.ShapeCreated Event

> Occurs when a new shape has been created. It occurs, when a shape has been inserted in TX Drawing Control's shapes collection by pasting or using the shape collection's Add 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:** 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.ShapeCreated Event
- **435 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapecreated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapecreated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapecreated-event/llms-full.txt

---

### Description

Occurs when a new [shape](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shape/llms-full.txt) has been created. It occurs, when a shape has been inserted in [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) by [pasting](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/paste-method/llms-full.txt) or using the shape collection's [Add](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shapecollection/add-method/llms-full.txt) 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 ShapeCreated;
```

```vbnet
Public Event ShapeCreated As ShapeEventHandler
```

### Examples

The following example records useful context when shape created occurs.

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

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

---

## Nearby

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