TX Text Control .NET Server

FrameCollection Class

Class|Introduced in 18.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll
Inherits
  1. FrameBaseCollection
  2. FrameCollection
Implements
ICollection, IEnumerable

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, 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.

Syntax

public sealed class FrameCollection : FrameBaseCollection

Examples

The following example works with frames in the current document.

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

Members

Properties

PropertyDescription
CountGets the number of elements contained in the collection. (Inherited from FrameBaseCollection.)
IsSynchronizedReturns true if the collection is designed to be thread safe, otherwise, it returns false. (Inherited from FrameBaseCollection.)
SyncRootGets an object that can be used to synchronize access to the collection. (Inherited from FrameBaseCollection.)

Methods

MethodDescription
ClearRemoves all objects from the collection and from the document. (Inherited from FrameBaseCollection.)
CopyToCopies the elements of the collection to an array, starting at a particular index.
GetEnumeratorReturns an enumerator that can be used to iterate through the collection. (Inherited from FrameBaseCollection.)
GetItemGets a particular image, text frame, chart, barcode or drawing from the collection.
RemoveRemoves a frame (image, text frame, chart, barcode or drawing) from a document.