Interface ITextContainer
Assembly: IronPPT.dll
Syntax
public interface ITextContainer : IHasTextStyle
ITextContainer is the contract for any element that holds and accepts runs of text, the small surface a developer uses to add words to a container and read them back. It captures the "this thing can contain text" capability shared by the parts of a presentation that carry text, so adding text works the same way wherever the text lives.
The concrete implementor in IronPPT is TextContainer, the base that text-holding elements build on. A developer typically works with a more specific element (a text box or a slide) but relies on this contract for the common text behavior underneath. Its own members are small and direct: the Texts property is a List<IText> exposing the runs the container holds, and AddText (overloaded for a plain string or an existing IText) appends a run and returns it. Default run formatting for the container is reached through the TextStyle member inherited from IHasTextStyle, so text added through this contract picks up a consistent style.
ITextContainer container = textBox;
container.AddText("Subtitle");
The add text how-to places text on a slide, and the add paragraph example builds runs of text.
Properties
Texts
Declaration
List<IText> Texts { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<IText> |
|
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