Instructions Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets an array of instructions that are executed when the specified conditions are fulfilled.
Syntax
public Instruction[] Instructions { get; set; }Public Property Instructions As Instruction()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.");
}Dim approvalField As New CheckFormField(False) With { .Name = "Approved" }
textControl.FormFields.Add(approvalField)
Dim conditionalInstruction As New ConditionalInstruction()
conditionalInstruction.Instructions = New Instruction() { New Instruction(New TXTextControl.CheckFormField(True), Instruction.InstructionTypes.IsEnabled, "Approved") }
If conditionalInstruction.Instructions IsNot Nothing Then
Console.WriteLine("Conditional Instruction: Instructions is available.")
End IfRemarks
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.