An instance of the DocumentTargetCollection class contains all targets in a Text Control document represented through objects of the type DocumentTarget. An instance of this class can only be obtained with the TextControl.DocumentTargets property. The DocumentTargetCollection class implements the IEnumerable and the ICollection interface. For more information see the technical article Text Fields and Hypertext Links.


public sealed class DocumentTargetCollection: ICollection, IEnumerable
Public NotInheritable Class DocumentTargetCollection
  Implements ICollection
  Implements IEnumerable


Method Description
Add Inserts the specified target at the current text input position.
Clear Removes all document targets from a Text Control document.
CopyTo Copies the elements of the collection to an array, starting at a particular index.
GetEnumerator Returns an enumerator that can be used to iterate through the collection.
GetItem Gets a particular document target from the collection.
GetItems Gets all document targets at the current text input position.
Remove Removes the specified target from a Text Control document.


Property Description
CanAdd Gets a value indicating whether a new document target can be inserted at the current text input position.
Count Gets the number of elements contained in the collection.
IsSynchronized Returns true if the collection is designed to be thread safe, otherwise, it returns false.
Item Gets the field with the specified number from the collection.
SyncRoot Gets an object that can be used to synchronize access to the collection.