Search Results for

    Show / Hide Table of Contents

    Interface IContentElement

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

    IContentElement is the contract every piece of placed content in a presentation satisfies, from a shape to a paragraph to a graphic. It carries the Parent that owns the element, a Status of type ElementStatus that tracks its state, and the lifecycle methods a developer uses to move it around: Clone to copy it, Remove to detach it, and Replace to swap in a different child. Coding against the contract lets editing logic act on any element uniformly.

    The implementors in IronPPT are the content classes themselves: the abstract ContentElement base supplies the shared behavior, and types such as ParentElement, Container, and the BaseGraphic graphic base build on it. A developer usually receives an IContentElement from a parent's children rather than constructing the interface, then reads Parent to walk up the tree or calls Remove and Replace to restructure the slide. Clone returns another IContentElement so the copy stays usable through the same contract.

    IContentElement parent = element.Parent;
    element.Remove();

    The slide element tutorial covers manipulating elements on a slide, and the manage slide how-to shows reorganizing slide content.

    Properties

    Parent

    Declaration
    IParentElement Parent { get; }
    Property Value
    Type Description
    IParentElement

    Status

    Declaration
    ElementStatus Status { get; set; }
    Property Value
    Type Description
    ElementStatus

    Methods

    Clone()

    Declaration
    IContentElement Clone()
    Returns
    Type Description
    IContentElement

    Remove()

    Declaration
    void Remove()

    Replace(IContentElement)

    Declaration
    void Replace(IContentElement newChild)
    Parameters
    Type Name Description
    IContentElement newChild
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet