# TXDrawingCore.ShapeCreated Event

> Occurs when a new shape has been created. It occurs, when a shape has been inserted in the TXDrawingCore'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 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.ShapeCreated Event
- **427 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapecreated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapecreated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapecreated-event/llms-full.txt

---

### Description

Occurs when a new [shape](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt) has been created. It occurs, when a shape has been inserted in the [TXDrawingCore](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/llms-full.txt)'s [shapes collection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapes-property/llms-full.txt) by [pasting](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/paste-method/llms-full.txt) or using the shape collection's [Add](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/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-wpf/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
tXDrawingCore.ShapeCreated += (sender, e) =>
{
    Console.WriteLine($"Shape Created at {DateTime.Now:u}");
};
```

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

---

## Nearby

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