Parameters 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 or sets the field's parameters. The order and format of the strings depend on the field's format. For example a Microsoft Word MergeField has the following format: MERGEFIELD FieldName [switches]. In this case the first string of the array is the FieldName and the following strings are possible switches. The string MERGEFIELD is the type name of the field and can be obtained through the ApplicationField.TypeName property. If a field has no parameters, this array is null.
Syntax
public string[] Parameters { get; set; }Public Property Parameters As String()Examples
The following example inserts and configures a Word-compatible mail-merge field by using ApplicationField.Parameters.
textControl.Text = "Dear Customer";
textControl.InputPosition = new InputPosition(5);
ApplicationField applicationField = new(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer", new[] { "CustomerName" });
textControl.ApplicationFields.Add(applicationField);
applicationField.Parameters = new[] { "CustomerName" };
if (applicationField.Parameters != null)
{
Console.WriteLine("Application Field: Parameters is available.");
}textControl.Text = "Dear Customer"
textControl.InputPosition = New InputPosition(5)
Dim applicationField As New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer", New String() { "CustomerName" })
textControl.ApplicationFields.Add(applicationField)
applicationField.Parameters = New String() { "CustomerName" }
If applicationField.Parameters IsNot Nothing Then
Console.WriteLine("Application Field: Parameters is available.")
End If