Clear Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Removes all document targets from a Text Control document.
Syntax
public void Clear();Public Sub Clear()Examples
The following example works with document targets in the current document by using DocumentTargetCollection.Clear.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
DocumentTargetCollection documentTargetCollection = textControl.DocumentTargets;
documentTargetCollection.Add(new DocumentTarget("CustomerDetails") { ID = 100 });
if (documentTargetCollection.Count > 0)
{
documentTargetCollection.Clear();
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim documentTargetCollection As DocumentTargetCollection = textControl.DocumentTargets
documentTargetCollection.Add(New DocumentTarget("CustomerDetails") With { .ID = 100 })
If documentTargetCollection.Count > 0 Then
documentTargetCollection.Clear()
End If