Interface IRun
Assembly: IronPPT.dll
Syntax
Styling a stretch of text that differs from the rest of its paragraph runs through IRun. A run is a contiguous span of characters that share one look, so it is what a developer works with to make a single phrase bold, recolor a word, or change the font of part of a line without splitting the paragraph. The FAQ places it against IParagraph, the larger line a run lives inside.
A developer receives an IRun from the text element that holds it rather than constructing one. The concrete implementor in IronPPT is Run, and the run carries its own TextStyle of type ITextStyle, which is where the font, weight, and color of the span are set. Texts lists the IText items the run holds and Index reports its position among sibling runs. AddText appends an IText or a plain string and returns the added text, and Clone copies the run.
IRun run = new Run();
run.AddText("Important");
run.TextStyle.IsBold = true;
The add text how-to covers placing text, and the add paragraph example shows runs inside a paragraph.
Properties
Index
Declaration
Property Value
| Type |
Description |
| System.Int32 |
|
Texts
Declaration
List<IText> Texts { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<IText> |
|
TextStyle
Declaration
ITextStyle TextStyle { get; set; }
Property Value
Methods
AddText(IText)
Declaration
IText AddText(IText text)
Parameters
| Type |
Name |
Description |
| IText |
text |
|
Returns
AddText(String)
Declaration
IText AddText(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns
Clone()
Declaration
Returns