An instance of the Text
public class TextPartCollection : ICollection, IEnumerablePublic Class TextPartCollection
Implements ICollection
Implements IEnumerable Introduced: 16.0.
The following example shows how to loop through all text parts a get the first line of each part.
foreach (object obj in textControl1.TextParts)
{
Console.WriteLine("First Line: " + ((IFormattedText)obj).Lines[1].Text);
}For Each obj As Object In textControl1.TextParts
Console.WriteLine("First Line: " + DirectCast(obj, IFormattedText).Lines(1).Text)
Next| Method | Description |
|---|---|
| Activate | Sets the input focus to the specified text part. |
| 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 certain text part from the collection. |
| Get |
Gets the main text part of the document. |
| Property | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. |
Learn more about the TXText