TX Text Control .NET for Windows Forms

ConditionalInstructionCollection Class

Class|Introduced in 28.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Implements
ICollection, IEnumerable

Description

An instance of the ConditionalInstructionCollection class contains all conditional instructions in a Text Control document or part of the document represented through objects of type ConditionalInstruction. An instance of this class can be obtained with the FormFieldCollection.ConditionalInstructions property. The ConditionalInstructionCollection class implements the IEnumerable and the ICollection interfaces.

Syntax

public class ConditionalInstructionCollection : ICollection, IEnumerable

Examples

The following example includes the conditional instruction names value from a Conditional Instruction Collection object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Conditional Instruction Names: {conditionalInstructionCollection.ConditionalInstructionNames}");
Console.WriteLine("Conditional Instruction Collection is ready for use.");

Members

Properties

PropertyDescription
ConditionalInstructionNamesGets the names of all ConditionalInstruction elements that are listed inside the collection.
CountGets the number of elements contained in the collection.

Methods

MethodDescription
AddInserts an instance of the class ConditionalInstruction to the collection and the document.
ClearRemoves all conditional instructions from the collection and the document.
CopyToCopies the elements of the collection to an array, starting at a particular index.
GetEnumeratorReturns an enumerator that can be used to iterate through the collection.
GetItemGets that ConditionalInstruction element from the collection, where the Name property value equals the specified name.
GetItemsGets those ConditionalInstruction elements from the collection, where at least one Condition or Instruction element references the specified FormField.
HasValidValueNot described in the reference. public bool HasValidValue(FormField formField);
IsValueValidReturns a value indicating whether the value of a specific form field is marked as valid. The corresponding validation is executed by the conditions of a conditional instruction and applied by an Instruction object, that marks the related form field as valid or invalid.
RemoveRemoves that ConditionalInstruction element from the collection and the document, where the Name property value equals the specified name.