TX Text Control .NET for Windows Forms

Clear Method

Method|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

Removes all conditional instructions from the collection and the document.

Syntax

public bool Clear();

Return Value

The return value is true, if all conditional instructions could be removed. Otherwise false. The objects won't be removed, if the TextControl.IsFormFieldValidationEnabled property is set to false or the TextControl.EditMode is set to EditMode.ReadAndSelect and TextControl.DocumentPermissions.ReadOnly to true.

Examples

The following example removes all conditional instruction objects from the collection and the document.

if (conditionalInstructionCollection.Count > 0)
{
    conditionalInstructionCollection.Clear();
}