Item Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
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 ApplicationFieldCollection class.
Syntax
public ApplicationField this[int number] { get; }Default Public ReadOnly Property Item(number As Integer) As ApplicationFieldExamples
The following example updates the first application field after checking that the collection is not empty.
textControl.Text = "Dear ,";
textControl.InputPosition = new InputPosition(5);
ApplicationFieldCollection fields = textControl.ApplicationFields;
ApplicationField customerField = new(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" }) { ID = 100 };
fields.Add(customerField);
if (fields.Count > 0)
{
fields[1].Text = "Contoso Ltd.";
}textControl.Text = "Dear ,"
textControl.InputPosition = New InputPosition(5)
Dim fields As ApplicationFieldCollection = textControl.ApplicationFields
Dim customerField As New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" }) With { .ID = 100 }
fields.Add(customerField)
If fields.Count > 0 Then
fields.Item(1).Text = "Contoso Ltd."
End IfLimitations
Read only.