# FrameCollection Class

> An instance of the FrameCollection class contains all images, text frames and charts in a document. The collection consists of objects of the types Image, TextFrame, ChartFrame and BarcodeFrame. An instance of this class can be obtained with the TextControl.Frames, WPF.TextControl.Frames and ServerTextControl.Frames properties. The FrameCollection class implements the IEnumerable and the ICollection interfaces.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 18.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.FrameBaseCollection`
- **Implements:** `System.Collections.ICollection`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > FrameCollection Class
- **1211 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/llms-full.txt

---

### Description

An instance of the FrameCollection class contains all images, text frames and charts in a document. The collection consists of objects of the types [Image](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/image/llms-full.txt), [TextFrame](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/llms-full.txt), [ChartFrame](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/chartframe/llms-full.txt) and [BarcodeFrame](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/barcodeframe/llms-full.txt). An instance of this class can be obtained with the [TextControl.Frames](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/frames-property/llms-full.txt), [WPF.TextControl.Frames](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/frames-property/llms-full.txt) and [ServerTextControl.Frames](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/frames-property/llms-full.txt) properties. The FrameCollection class implements the IEnumerable and the ICollection interfaces.

### Syntax

```csharp
public sealed class FrameCollection : FrameBaseCollection
```

```vbnet
Public NotInheritable Class FrameCollection
    Inherits FrameBaseCollection
```

### Examples

The following example works with frames in the current document.

```csharp
FrameCollection frameCollection = textControl.Frames;
TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);
```

```vbnet
Dim frameCollection As FrameCollection = textControl.Frames
Dim callout As New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout" }
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText)
```

---

## In This Section

- [FrameCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/copyto-method/llms-full.txt): Copies the elements of the collection to an array, starting at a particular index.
- [FrameCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/getitem-method/llms-full.txt): Gets a particular image, text frame, chart, barcode or drawing from the collection.
- [FrameCollection.Remove Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/remove-method/llms-full.txt): Removes a frame (image, text frame, chart, barcode or drawing) from a document.

---

## Nearby

- **Previous:** [FrameBaseCollection.SyncRoot Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framebasecollection/syncroot-property/llms-full.txt)
- **Next:** [FrameCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/framecollection/copyto-method/llms-full.txt)
