TX Text Control .NET for Windows Forms

Item Property

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

Description

Gets the subtextpart with the specified number from the collection. The number must be between 1 and Count. In C# this property is the indexer for the SubTextPartCollection class.

Syntax

public SubTextPart this[int number] { get; }

Examples

The following example updates the metadata stored with the first named region.

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].Data = @"{""reviewed"":true}";
}

Limitations

Read only.