Class TextRunCollection
A typed collection of DrawingTextElement objects on a DrawingTextParagraph. Inherits all List<T> operations and adds Add(string) (create new run) convenience method.
Implements
Inherited Members
Namespace: DRIT.Presentation.Drawing
Assembly: DRIT.Presentation.dll
Syntax
public class TextRunCollection : List<DrawingTextElement>, IList<DrawingTextElement>, ICollection<DrawingTextElement>, IList, ICollection, IReadOnlyList<DrawingTextElement>, IReadOnlyCollection<DrawingTextElement>, IEnumerable<DrawingTextElement>, IEnumerable
Properties
this[int]
Gets or sets the value associated with this object.
Declaration
public DrawingTextElement this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type | Description |
|---|---|
| DrawingTextElement |
Methods
Add(DrawingTextElement)
Adds the value to this text run collection.
Declaration
public void Add(DrawingTextElement run)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawingTextElement | run |
Add(string)
Creates and adds a new text run with the specified text.
Declaration
public DrawingTextRun Add(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | The text for the new run. |
Returns
| Type | Description |
|---|---|
| DrawingTextRun | The newly created run. |
AddRange(IEnumerable<DrawingTextElement>)
Adds the range to this text run collection.
Declaration
public void AddRange(IEnumerable<DrawingTextElement> runs)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<DrawingTextElement> | runs |
Clear()
Removes all entries from this text run collection.
Declaration
public void Clear()
Insert(int, DrawingTextElement)
Inserts an item at the specified zero-based index.
Declaration
public void Insert(int index, DrawingTextElement run)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The zero-based index of the item. |
| DrawingTextElement | run |
RemoveAt(int)
Removes the item at the specified zero-based index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |