Search Results for

    Show / Hide Table of Contents

    Interface IStyle

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

    Named formatting that several paragraphs and runs can share lives behind IStyle. It is the contract for a reusable style definition, the kind a developer applies to many elements so a heading or body look is defined once and reused, rather than setting font, color, and spacing element by element.

    A style is reached and edited through this contract: Style is the concrete implementor in IronPPT, and a developer works with one to set up the formatting a document reuses. The interface pulls the two halves of a style, its run-level look and its paragraph-level layout, together so they travel as a single named unit. Defining the look in one place means a later change to that style updates every paragraph that points at it, instead of forcing a sweep over each element.

    The properties split into identity and content. StyleName is the human-readable name, BasedOn names a parent style to inherit from, NextParagraphStyle names the style applied to the following paragraph, and IsPrimaryStyle flags the primary style. StyleType is a Nullable<StyleValues> recording what kind of style this is. The two content members carry the actual formatting: TextStyle is an ITextStyle (font, bold, italic, color, underline, and spacing for runs) and ParagraphStyle is an IParagraphStyle (paragraph-level layout). Setting both on one style and giving it a StyleName produces a definition the document can reuse across its paragraphs.

    IStyle style = document.Styles.First();
    style.TextStyle.IsBold = true;
    style.StyleName = "Heading";

    The paragraph style example sets paragraph formatting, the add text how-to places styled text, and the slide element tutorial covers slide elements.

    Properties

    BasedOn

    Declaration
    string BasedOn { get; set; }
    Property Value
    Type Description
    System.String

    IsPrimaryStyle

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

    NextParagraphStyle

    Declaration
    string NextParagraphStyle { get; set; }
    Property Value
    Type Description
    System.String

    ParagraphStyle

    Declaration
    IParagraphStyle ParagraphStyle { get; set; }
    Property Value
    Type Description
    IParagraphStyle

    StyleName

    Declaration
    string StyleName { get; set; }
    Property Value
    Type Description
    System.String

    StyleType

    Declaration
    Nullable<StyleValues> StyleType { get; set; }
    Property Value
    Type Description
    System.Nullable<StyleValues>

    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