GetItems Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets all document targets at the current text input position. The method returns null, if there is no target at the current input position.
Syntax
public DocumentTarget[] GetItems();Public Function GetItems() As DocumentTarget()Return Value
The return value is null, if there is no target at the current input position. Otherwise, it is an array of objects of the type DocumentTarget.
Examples
The following example works with document targets in the current document by using DocumentTargetCollection.GetItems.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
DocumentTargetCollection documentTargetCollection = textControl.DocumentTargets;
documentTargetCollection.Add(new DocumentTarget("CustomerDetails") { ID = 100 });
DocumentTarget[] results = documentTargetCollection.GetItems();
foreach (DocumentTarget documentTarget in results)
{
Console.WriteLine(documentTarget);
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim documentTargetCollection As DocumentTargetCollection = textControl.DocumentTargets
documentTargetCollection.Add(New DocumentTarget("CustomerDetails") With { .ID = 100 })
Dim results As DocumentTarget() = documentTargetCollection.GetItems()
For Each documentTarget As DocumentTarget In results
Console.WriteLine(documentTarget)
Next