TX Text Control .NET Server

Count Property

Property|Introduced in 23.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets the number of elements contained in the collection.

Syntax

public int Count { get; }

Examples

The following example navigates to the first named region when the document contains one.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPartCollection parts = textControl.SubTextParts;
SubTextPart customer = new("CustomerName", 10) { Data = @"{""category"":""customer""}" };
parts.Add(customer);
if (parts.Count > 0)
{
    parts[1].ScrollTo();
}

Limitations

Read only.