TX Text Control .NET for WPF

Conditions Property

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

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; }

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.");
}

Remarks

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.