Search Results for

    Show / Hide Table of Contents

    Interface IParagraphStyle

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

    When a paragraph needs consistent spacing, indentation, alignment, or a bullet, IParagraphStyle is the contract that carries those settings. It is the paragraph-level styling object a developer reads from or assigns when shaping a list, a heading, or a body block, and it is distinct from ITextStyle, which controls the look of the characters themselves rather than the paragraph that holds them. The FAQ below resolves that pairing.

    A developer attaches the style to a paragraph rather than building a freestanding one. The concrete implementor in IronPPT is ParagraphStyle, and a paragraph applies it through SetStyle (on IParagraph). Because the implementor is built on the document-style hierarchy, the same style shape carries across the elements that accept paragraph styling, so layout rules stay uniform from one paragraph to the next. Reading the style back from a paragraph lets editing code adjust one setting without rebuilding the whole style.

    The members fall into spacing, indentation, and bullet groups. For spacing, SpaceBefore and SpaceAfter set the gaps above and below the paragraph as DocUnit values, LineSpacing sets the inter-line distance, and ContextualSpacing suppresses spacing between same-style paragraphs so a tight list does not gain extra gaps. For layout, Alignment sets the horizontal TextAlignmentTypeValues, Indent sets the leading inset as a DocUnit, and RightToLeft flips the reading direction for languages that need it. For lists, Bullet assigns an IBullet that defines the marker while NoBullet removes any marker entirely. ContextualSpacing, NoBullet, and RightToLeft are nullable, so an unset value can inherit from the document defaults rather than forcing a choice.

    IParagraphStyle style = new ParagraphStyle();
    style.Alignment = TextAlignmentTypeValues.Center;
    style.SpaceAfter = new DocUnit { Point = 12 };
    paragraph.SetStyle(style);

    The paragraph style example builds a style end to end, the customized bullet point example walks through the bullet members, and the add text how-to covers the text the style applies to.

    Properties

    Alignment

    Declaration
    TextAlignmentTypeValues Alignment { get; set; }
    Property Value
    Type Description
    TextAlignmentTypeValues

    Bullet

    Declaration
    IBullet Bullet { get; set; }
    Property Value
    Type Description
    IBullet

    ContextualSpacing

    Declaration
    Nullable<bool> ContextualSpacing { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>

    Indent

    Declaration
    DocUnit Indent { get; set; }
    Property Value
    Type Description
    DocUnit

    LineSpacing

    Declaration
    DocUnit LineSpacing { get; set; }
    Property Value
    Type Description
    DocUnit

    NoBullet

    Declaration
    Nullable<bool> NoBullet { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>

    RightToLeft

    Declaration
    Nullable<bool> RightToLeft { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>

    SpaceAfter

    Declaration
    DocUnit SpaceAfter { get; set; }
    Property Value
    Type Description
    DocUnit

    SpaceBefore

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