Search Results for

    Show / Hide Table of Contents

    Interface IContainer

    Inherited Members
    IParentElement.Clone()
    IParentElement.ExtractElements<T>()
    IParentElement.GetChildByIndex<T>(Int32)
    IParentElement.InsertChildToIndex(Int32, IContentElement[])
    IParentElement.LogObjectTree()
    IParentElement.Remove()
    IParentElement.RemoveAllChildren()
    IParentElement.RemoveChildren(IContentElement[])
    IParentElement.Children
    IContentElement.Replace(IContentElement)
    IContentElement.Parent
    IContentElement.Status
    Namespace: IronPPT.Interfaces
    Assembly: IronPPT.dll
    Syntax
    public interface IContainer : IParentElement, IContentElement

    When a part of a presentation holds other elements and supplies default styling for them, IContainer is the contract that describes it. It gathers the child Slides it owns, the BuiltInStyles available to its content, and the ParagraphsDefaultStyle and TextsDefaultStyle that new paragraphs and runs inherit. The AddChild method accepts a params array of IContentElement, so several children can be attached in one call. Coding against the contract lets layout logic treat any container the same way.

    The concrete implementor in IronPPT is Container, the document-level holder that exposes the slide collection and the default styles a presentation applies. Because IContainer extends both IParentElement and IContentElement, an implementor is also a parent that can own children and a content element that can be cloned, removed, or replaced. A developer typically reads Slides to enumerate slides and sets ParagraphsDefaultStyle or TextsDefaultStyle to establish the baseline formatting, then calls AddChild to attach content.

    List<ISlide> slides = container.Slides;
    container.AddChild(newElement);

    The add slide how-to covers adding slides to a presentation, and the slide element tutorial walks through the elements a container holds.

    Properties

    BuiltInStyles

    Declaration
    List<IStyle> BuiltInStyles { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<IStyle>

    ParagraphsDefaultStyle

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

    Slides

    Declaration
    List<ISlide> Slides { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<ISlide>

    TextsDefaultStyle

    Declaration
    ITextStyle TextsDefaultStyle { get; set; }
    Property Value
    Type Description
    ITextStyle

    Methods

    AddChild(IContentElement[])

    Declaration
    void AddChild(params IContentElement[] children)
    Parameters
    Type Name Description
    IContentElement[] children

    Inherited members

    Clone()
    ExtractElements<T>()
    GetChildByIndex<T>(Int32)
    InsertChildToIndex(Int32, IContentElement[])
    LogObjectTree()
    Remove()
    RemoveAllChildren()
    RemoveChildren(IContentElement[])
    Children
    Replace(IContentElement)
    Parent
    Status
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet