TX Text Control .NET for WPF

Enabled 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 set a value indicating whether the form field is enabled. This property has only an effect, when the when the TextControl.EditMode is set to ReadAndSelect and the DocumentPermissions.AllowEditingFormFields property has been set to true. In this case a Formfield can only be edited, when its Enabled property is true. When a FormField is disabled, the TextFieldClicked and TextFieldDoubleClicked of the Formfield are suppressed. The default value of this property is true.

Syntax

public bool Enabled { get; set; }

Examples

The following example retrieves the form field at the current input position and inspects it by using FormField.Enabled.

CheckFormField field = new(false) { Name = "AcceptTerms" };
textControl.FormFields.Add(field);
FormField formField = textControl.FormFields.GetItem();

formField.Enabled = true;
if (formField.Enabled)
{
    Console.WriteLine("Form Field: Enabled is enabled.");
}