Search Results for

    Show / Hide Table of Contents

    Class Text

    Inheritance
    System.Object
    ContentElement
    TextContentElement
    Text
    Implements
    ICloneableElement
    IText
    IContentElement
    ITextContentElement
    IHasTextStyle
    Inherited Members
    TextContentElement.Replace(String, String, Nullable<RegexOptions>, Boolean, Boolean)
    TextContentElement.Find(String, Nullable<RegexOptions>, Boolean, Boolean)
    TextContentElement.ToString()
    TextContentElement.Text
    TextContentElement.TextStyle
    ContentElement._Index
    ContentElement.Replace(IContentElement)
    ContentElement.Remove()
    ContentElement.GetIndex()
    ContentElement.Clone()
    ContentElement.CloneObject<T>(T)
    ContentElement.CaptureInitialValues()
    ContentElement.Index
    ContentElement.Parent
    ContentElement.Status
    Namespace: IronPPT.Models
    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
    public Text()

    Text(String)

    Declaration
    public Text(string text)
    Parameters
    Type Name Description
    System.String text

    Methods

    Append(IText)

    Declaration
    public IText Append(IText text)
    Parameters
    Type Name Description
    IText text
    Returns
    Type Description
    IText

    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

    ICloneableElement
    IText
    IContentElement
    ITextContentElement
    IHasTextStyle

    Inherited members

    Replace(String, String, Nullable<RegexOptions>, Boolean, Boolean)
    Find(String, Nullable<RegexOptions>, Boolean, Boolean)
    ToString()
    Text
    TextStyle
    _Index
    Replace(IContentElement)
    Remove()
    GetIndex()
    Clone()
    CloneObject<T>(T)
    CaptureInitialValues()
    Index
    Parent
    Status
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet