Interface IContentElement
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
Status
Declaration
ElementStatus Status { get; set; }
Property Value
Methods
Clone()
Declaration
Returns
Remove()
Declaration
Replace(IContentElement)
Declaration
void Replace(IContentElement newChild)
Parameters