# ShapeCollection.Insert Method

> Inserts an object of the type Shape to the collection at a specified index.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.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 > ShapeCollection.Insert Method
- **473 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapecollection/insert-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapecollection/insert-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapecollection/insert-method/llms-full.txt

---

### Description

Inserts an object of the type [Shape](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt) to the [collection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapecollection/llms-full.txt) at a specified index.

### Syntax

```csharp
public void Insert(int index, Shape shape);
```

```vbnet
Public Sub Insert(index As Integer, shape As Shape)
```

### Parameters

| Parameter | Description |
|---|---|
| index | Specifies the index where to insert the speicified [shape](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt). |
| shape | Specifies the [shape](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt) to insert at the specified index. |

### Examples

The following example uses Insert in a focused Shape Collection workflow. The created object is then available to the surrounding document workflow.

```csharp
shapeCollection.Insert(1, new TXTextControl.Drawing.Shape());
Console.WriteLine("Shape Collection is ready for use.");
```

```vbnet
shapeCollection.Insert(1, New TXTextControl.Drawing.Shape())
Console.WriteLine("Shape Collection is ready for use.")
```

---

## Nearby

- **Previous:** [ShapeCollection.AddStyle Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapecollection-addstyle/enumeration/llms-full.txt)
- **Next:** [ShapeCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapecollection/item-property/llms-full.txt)
