Search Results for

    Show / Hide Table of Contents

    Interface IHasParagraphStyle

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

    Reach for IHasParagraphStyle when code needs to read or set paragraph formatting without caring which element carries it. The contract marks an element as owning a paragraph style, so a method that aligns text or sets spacing can accept the contract and work the same on every element that has one. A developer meets it while applying consistent paragraph formatting across a presentation.

    An element that has a paragraph style is obtained from the slide content it lives in, so the contract is usually reached through an existing paragraph or text box and then read or assigned. It carries a single member: Style, an IParagraphStyle holding the alignment, indentation, spacing, and related paragraph settings. Set Style to apply a prepared style, or read it to inspect the current formatting. Concrete implementors in IronPPT include Paragraph and TextBox, so the same style assignment works whether the target is a single paragraph or the box that contains it.

    element.Style = paragraphStyle;

    The paragraph style example sets paragraph formatting, and the add paragraph example adds the text it applies to.

    Properties

    Style

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