Item Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
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 TextFieldCollection class.
Syntax
public TextField this[int number] { get; }Default Public ReadOnly Property Item(number As Integer) As TextFieldExamples
The following example works with text fields in the current document by using TextFieldCollection.Item.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
TextFieldCollection textFieldCollection = textControl.TextFields;
textFieldCollection.Add(new ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" }) { ID = 100 });
Console.WriteLine($"Item: {textFieldCollection[10]}");
Console.WriteLine("Text Field Collection is ready for use.");textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim textFieldCollection As TextFieldCollection = textControl.TextFields
textFieldCollection.Add(New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" }) With { .ID = 100 })
Console.WriteLine($"Item: {textFieldCollection.Item(10)}")
Console.WriteLine("Text Field Collection is ready for use.")Limitations
Read only.