TX Text Control .NET for WPF

Instructions 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 instructions that are executed when the specified conditions are fulfilled.

Syntax

public Instruction[] Instructions { get; set; }

Examples

The following example builds a rule around an approval check box in a fillable form by using ConditionalInstruction.Instructions.

CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
ConditionalInstruction conditionalInstruction = new();

conditionalInstruction.Instructions = new Instruction[] { new Instruction(new TXTextControl.CheckFormField(true), Instruction.InstructionTypes.IsEnabled, "Approved") };
if (conditionalInstruction.Instructions != null)
{
    Console.WriteLine("Conditional Instruction: Instructions is available.");
}

Remarks

A System.ArgumentException is thrown if the set value is null, an empty array of instructions, at least one of the array elements is null or the array contains an Instruction element, where its InstructionType property value is already set by another Instruction array element for the same FormField, a System.ArgumentException is thrown.