TX Text Control .NET Server

TextPartCollection Class

Class|Introduced in 22.0
Namespace
TXTextControl.Web
Package
TXTextControl.Web from nuget.org, the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Web.DocumentEditor.dll
Install
dotnet add package TXTextControl.Web
Implements
ICollection<IFormattedText>, IEnumerable<IFormattedText>, IEnumerable

Description

An instance of the Web.TextPartCollection class contains all text parts in a TX Text Control document. A text part can either be the document's main text, a text frame or a header or footer. A text frame is represented through a Web.TextFrame object, a header or footer through a Web.HeaderFooter object and the document's main text is represented through a Web.MainText object. A Web.TextPartCollection object contains all these objects in a geometric order. The first object in the collection is the main text, followed by all text frames in geometric order. At the end of the collection all headers and footers are contained also geometrically ordered. All objects in a text part collection implement the Web.IFormattedText interface. The collection can be obtained with the Web.TextControl.TextParts property. The Web.TextPartCollection class implements the interface ICollection<Web.IFormattedText>.

Syntax

public class TextPartCollection : ICollection<IFormattedText>, IEnumerable<IFormattedText>, IEnumerable

Examples

The following example creates a Text Part Collection object and prepares it for a document workflow.

TXTextControl.Web.TextPartCollection textPartCollection = new(new TXTextControl.Web.WebSocketHandler());
Console.WriteLine("Text Part Collection is ready for the document workflow.");

Members

Constructors

ConstructorDescription
TextPartCollectionNot described in the reference. public TextPartCollection(WebSocketHandler wsHandler);

Properties

PropertyDescription
CountNot described in the reference. public int Count { get; }
IsReadOnlyNot described in the reference. public bool IsReadOnly { get; }

Methods

MethodDescription
ActivateSets the input focus to the specified text part. If the activated text part is not in the visible part of the document, the document is scrolled.
AddNot described in the reference. public void Add(IFormattedText item);
ClearNot described in the reference. public void Clear();
ContainsNot described in the reference. public bool Contains(IFormattedText item);
CopyToNot described in the reference. public void CopyTo(IFormattedText[] array, int arrayIndex);
GetEnumeratorNot described in the reference. public TextPartEnumerator GetEnumerator();
RemoveNot described in the reference. public bool Remove(IFormattedText item);