Class Text
Inheritance
System.Object
Text
Assembly: IronPPT.dll
Syntax
public class Text : TextContentElement, ICloneableElement, IText, IContentElement, ITextContentElement, IHasTextStyle
Holding a styled run of words on a slide is the job of Text. It is the content element a developer works with after calling AddText on a slide or text box, and it carries both the characters and the formatting that decide how they appear.
A developer rarely constructs one directly, since Slide.AddText and TextBox.AddText return an IText that a Text implements. The inherited Text property (a string) holds the actual characters, and the inherited TextStyle property (an ITextStyle) controls bold, italic, color, and size. The own Append method joins another IText to this one, and Split breaks the run into a List<IText> at a delimiter, useful when one block needs to become several styled segments. The inherited Find and Replace methods locate and swap substrings without rebuilding the run, so dynamic content can be patched in place.
IText text = slide.AddText("Quarterly Report");
text.TextStyle.IsBold = true;
The add text how-to inserts text on a slide, and the add paragraph example builds richer text content.
Constructors
Text()
Declaration
Text(String)
Declaration
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Methods
Append(IText)
Declaration
public IText Append(IText text)
Parameters
| Type |
Name |
Description |
| IText |
text |
|
Returns
Split(String)
Declaration
public List<IText> Split(string delimiter)
Parameters
| Type |
Name |
Description |
| System.String |
delimiter |
|
Returns
| Type |
Description |
| System.Collections.Generic.List<IText> |
|
Implements