Interface ISlide
Assembly: IronPPT.dll
Syntax
public interface ISlide : IGraphic, IContentElement
Building up a single page of a presentation in C# runs through ISlide. It is the contract for one slide and gives a developer everything needed to add content to that slide and to read back what is already there, so a report generator can append shapes, text, and images to a page through one consistent surface.
A developer receives an ISlide rather than constructing it: PresentationDocument.Slides is a List<Slide>, and Slide (the concrete implementor) is what those entries are, while AddSlide returns a fresh one to fill. From there the slide is the parent every other element attaches to, and editing the deck means walking its slides and adding to or reading from each in turn.
The members fall into clear functional groups. The add methods grow the slide: AddShape takes an IShape, AddText accepts a string or an IText, AddParagraph takes an IParagraph, AddImage has overloads for a file path, a Stream, an AnyBitmap, or an IImage, and AddChild attaches several IContentElement items at once. The read-back collections expose what the slide holds: Shapes (a List<IShape>), Texts, TextBoxes, Paragraphs, and Images. The slide-state members cover the rest: ID and Index identify and order the slide, IsMasterSlide flags a master, and ShowMasterPlaceholderAnimations toggles inherited animations. Geometry such as Height, Width, Angle, and Position is inherited from IGraphic, so the same slide object answers both content questions and layout questions through one surface.
ISlide slide = document.Slides[0];
slide.AddText("Quarterly Summary");
slide.AddImage("chart.png");
The add slide example creates a slide, the manage slide how-to walks through editing one, and the add text how-to covers placing text on a slide.
Properties
ID
Declaration
Property Value
| Type |
Description |
| System.String |
|
Images
Declaration
List<IImage> Images { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<IImage> |
|
Index
Declaration
Property Value
| Type |
Description |
| System.Int32 |
|
IsMasterSlide
Declaration
bool IsMasterSlide { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
Paragraphs
Declaration
List<IParagraph> Paragraphs { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<IParagraph> |
|
Shapes
Declaration
List<IShape> Shapes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<IShape> |
|
ShowMasterPlaceholderAnimations
Declaration
Nullable<bool> ShowMasterPlaceholderAnimations { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.Boolean> |
|
TextBoxes
Declaration
List<ITextBox> TextBoxes { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<ITextBox> |
|
Texts
Declaration
List<IText> Texts { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.List<IText> |
|
Methods
AddChild(IContentElement[])
Declaration
void AddChild(params IContentElement[] children)
Parameters
AddImage(IImage)
Declaration
IImage AddImage(IImage image)
Parameters
| Type |
Name |
Description |
| IImage |
image |
|
Returns
AddImage(AnyBitmap)
Declaration
IImage AddImage(AnyBitmap anyBitmap)
Parameters
| Type |
Name |
Description |
| IronSoftware.Drawing.AnyBitmap |
anyBitmap |
|
Returns
AddImage(Stream)
Declaration
IImage AddImage(Stream imageStream)
Parameters
| Type |
Name |
Description |
| System.IO.Stream |
imageStream |
|
Returns
AddImage(String)
Declaration
IImage AddImage(string imagePath)
Parameters
| Type |
Name |
Description |
| System.String |
imagePath |
|
Returns
AddParagraph(IParagraph)
Declaration
IParagraph AddParagraph(IParagraph paragraph)
Parameters
Returns
AddShape(IShape)
Declaration
IShape AddShape(IShape shape)
Parameters
| Type |
Name |
Description |
| IShape |
shape |
|
Returns
AddText(IText)
Declaration
IText AddText(IText text)
Parameters
| Type |
Name |
Description |
| IText |
text |
|
Returns
AddText(String)
Declaration
IText AddText(string text)
Parameters
| Type |
Name |
Description |
| System.String |
text |
|
Returns