Interface IContainer
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
Slides
Declaration
List<ISlide> Slides { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<ISlide> |
|
TextsDefaultStyle
Declaration
ITextStyle TextsDefaultStyle { get; set; }
Property Value
Methods
AddChild(IContentElement[])
Declaration
void AddChild(params IContentElement[] children)
Parameters