Search Results for

    Show / Hide Table of Contents

    Interface IHasTextStyle

    Namespace: IronPPT.Interfaces
    Assembly: IronPPT.dll
    Syntax
    public interface IHasTextStyle

    When formatting needs to apply to characters rather than whole paragraphs, IHasTextStyle is the contract that exposes it. It marks an element as owning a text style, the font, size, color, and emphasis that decorate a run of characters, so code can set that formatting uniformly across any element that carries text. A developer works through it while styling the words inside a slide, separate from how the paragraphs are laid out.

    A text-styled element is reached through the slide content that holds the text, so the contract is normally obtained from an existing run or text element and then read or assigned. It declares one member: TextStyle, an ITextStyle carrying the character-level formatting. Assign a prepared ITextStyle to restyle the text, or read it to check the current font and emphasis. Concrete implementors in IronPPT include Run, Text, and Paragraph, so the same style applies whether the target is a single run of characters or a larger text element.

    element.TextStyle = textStyle;

    The add text how-to adds the text to style, and the add paragraph example shows the surrounding content.

    Properties

    TextStyle

    Declaration
    ITextStyle TextStyle { get; set; }
    Property Value
    Type Description
    ITextStyle
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet