TX Text Control .NET for Windows Forms

Item Property

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

Description

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

Syntax

public DocumentTarget this[int number] { get; }

Examples

The following example works with document targets in the current document by using DocumentTargetCollection.Item.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
DocumentTargetCollection documentTargetCollection = textControl.DocumentTargets;
documentTargetCollection.Add(new DocumentTarget("CustomerDetails") { ID = 100 });

Console.WriteLine($"Item: {documentTargetCollection[10]}");
Console.WriteLine("Document Target Collection is ready for use.");

Limitations

Read only.