TX Text Control .NET for Windows Forms

Name Property

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

Description

Gets or sets a name of the conditional instruction.

Syntax

public string Name { get; set; }

Examples

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

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

conditionalInstruction.Name = "ConditionalInstruction1";
if (!string.IsNullOrWhiteSpace(conditionalInstruction.Name))
{
    Console.WriteLine($"Name: {conditionalInstruction.Name}");
}

Remarks

A System.ArgumentException is thrown if the set value is null, an empty string or the name of another ConditionalInstruction object inside the ConditionalInstructionCollection where this object is part of it.