TX Text Control .NET for WPF

IsInitialInstruction 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 a value indicating whether this Instruction is handled when the document is initialized as a form. By default, all conditional instructions are applied when the document is changed to or loaded as a form. In this context, if this property is set to false, the instruction does not execute any actions, even if the requirements are fulfilled. The default value is true.

Syntax

public bool IsInitialInstruction { get; set; }

Examples

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

CheckFormField approvalField = new(false) { Name = "Approved" };
textControl.FormFields.Add(approvalField);
Instruction instruction = new(approvalField, Instruction.InstructionTypes.IsEnabled, true);

instruction.IsInitialInstruction = true;
if (instruction.IsInitialInstruction)
{
    Console.WriteLine("Instruction: Is Initial Instruction is enabled.");
}