Conditions 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 an array of conditions, that represent the requirements that has to be fulfilled to execute the specified instructions. Each element of that array is linked by a logical connective connector with its previous element. Based on these relationships, in which the individual conditions relate to each other, it is evaluated whether the requirements to execute the instructions has been fulfilled.
Syntax
public Condition[] Conditions { get; set; }Public Property Conditions As Condition()Examples
The following example builds a rule around an approval check box in a fillable form by using ConditionalInstruction.Conditions.
CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
ConditionalInstruction conditionalInstruction = new();
conditionalInstruction.Conditions = new Condition[] { new Condition(new TXTextControl.CheckFormField(true), true) };
if (conditionalInstruction.Conditions != null)
{
Console.WriteLine("Conditional Instruction: Conditions is available.");
}Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim conditionalInstruction As New ConditionalInstruction()
conditionalInstruction.Conditions = New Condition() { New Condition(New TXTextControl.CheckFormField(True), True) }
If conditionalInstruction.Conditions IsNot Nothing Then
Console.WriteLine("Conditional Instruction: Conditions is available.")
End IfRemarks
A System.ArgumentException is thrown if the set value is null, an empty array of conditions or at least one of the array elements is null.