An instance of the Document
public sealed class DocumentTargetCollection: ICollection, IEnumerable
Public NotInheritable Class DocumentTargetCollection
Implements ICollection
Implements IEnumerable
The following example shows how to use the TXText
//create documentTragets
TXTextControl.DocumentTarget newTarget = new TXTextControl.DocumentTarget("Page1");
newTarget.ID = 1;
//Add documentTargets to collection
if (textControl1.DocumentTargets.CanAdd)
{
textControl1.DocumentTargets.Add(newTarget);
textBox1.Text = "DocumentTarget Name: " + newTarget.Name + " could be added" + Environment.NewLine +
"Id is: " + newTarget.ID + Environment.NewLine +
"textControl1.DocumentTargets.Count is: " + textControl1.DocumentTargets.Count + Environment.NewLine + Environment.NewLine";
} else textBox1.Text("DocumentTarget Name: " + newTarget.Name + "could NOT be added" + Environment.NewLine + Environment.NewLine);
Dim newTarget As TXTextControl.DocumentTarget = New TXTextControl.DocumentTarget("Page1")
newTarget.ID = 1
If textControl1.DocumentTargets.CanAdd Then
textControl1.DocumentTargets.Add(newTarget)
textBox1.Text = "DocumentTarget Name: " & newTarget.Name & " could be added" + Environment.NewLine & "Id is: " + newTarget.ID + Environment.NewLine & "textControl1.DocumentTargets.Count is: " + textControl1.DocumentTargets.Count + Environment.NewLine + Environment.NewLine
";"
Else
textBox1.Text("DocumentTarget Name: " & newTarget.Name & "could NOT be added" + Environment.NewLine + Environment.NewLine)
End If
Method | Description |
---|---|
Add | Inserts the specified target at the current text input position. |
Clear | Removes all document targets from a Text Control document. |
Copy |
Copies the elements of the collection to an array, starting at a particular index. |
Get |
Returns an enumerator that can be used to iterate through the collection. |
Get |
Gets a particular document target from the collection. |
Get |
Gets all document targets at the current text input position. |
Remove | Removes the specified target from a Text Control document. |
Property | Description |
---|---|
Can |
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. |
Is |
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. |
Sync |
Gets an object that can be used to synchronize access to the collection. |