Search Results for

    Show / Hide Table of Contents

    Class ParagraphStyle

    Inheritance
    System.Object
    DocumentStyle
    ParagraphStyle
    Implements
    IDocumentStyle
    IParagraphStyle
    Inherited Members
    DocumentStyle.StyleId
    DocumentStyle.Status
    Namespace: IronPPT.Models
    Assembly: IronPPT.dll
    Syntax
    public class ParagraphStyle : DocumentStyle, IDocumentStyle, IParagraphStyle

    ParagraphStyle collects the formatting that applies to a whole paragraph, the bullets, spacing, indentation, and alignment a developer sets once and reuses across slides. It is the object assigned to a Paragraph through its Style property, so the look of a block of text is configured in one place instead of scattered across individual settings. It is the paragraph-level counterpart to the run and text styles that format inline content.

    Build one with new ParagraphStyle() and set its properties, usually with an object initializer, then assign it to paragraph.Style. Because the style is a separate object, the same ParagraphStyle can be applied to several paragraphs to keep a list or a body of slides consistent, which is the usual reason to define it on its own rather than inline. It derives from the shared DocumentStyle base, so it carries the common styling behavior the presentation's style objects share while adding the paragraph-specific settings.

    The bullet and spacing properties carry the everyday settings. Bullet, an IBullet, defines a custom bullet such as a picture or colored mark, while NoBullet turns bullets off. Alignment takes a TextAlignmentTypeValues for horizontal alignment, and Indent, LineSpacing, SpaceBefore, and SpaceAfter are DocUnit measurements that control the paragraph's spacing and indentation. ContextualSpacing and RightToLeft are nullable flags for contextual spacing and right-to-left layout, left unset until a paragraph needs them.

    using IronPPT.Models;
    
    var style = new ParagraphStyle
    {
        Alignment = TextAlignmentTypeValues.Center,
        NoBullet = true,
        SpaceAfter = 15,
    };

    The paragraph style example sets these properties end to end, the customized bullet point example configures the bullet, and the add text how-to covers the surrounding text.

    Constructors

    ParagraphStyle()

    Declaration
    public ParagraphStyle()

    Properties

    Alignment

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

    Bullet

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

    ContextualSpacing

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

    Indent

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

    LineSpacing

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

    NoBullet

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

    RightToLeft

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

    SpaceAfter

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

    SpaceBefore

    Declaration
    public DocUnit SpaceBefore { get; set; }
    Property Value
    Type Description
    DocUnit

    Implements

    IDocumentStyle
    IParagraphStyle

    Inherited members

    StyleId
    Status
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet