Search Results for

    Show / Hide Table of Contents

    Class Slide

    Inheritance
    System.Object
    ContentElement
    ParentElement
    Slide
    Implements
    ICloneableElement
    IParentElement
    ISlide
    IGraphic
    IContentElement
    Inherited Members
    ParentElement.InsertChildToIndex(Int32, IContentElement[])
    ParentElement.Remove()
    ParentElement.RemoveChildren(IContentElement[])
    ParentElement.RemoveAllChildren()
    ParentElement.ExtractElements<T>()
    ParentElement.GetChildByIndex<T>(Int32)
    ParentElement.Clone()
    ParentElement.CloneElement<T>(T)
    ParentElement.LogObjectTree()
    ParentElement.Children
    ContentElement._Index
    ContentElement.Replace(IContentElement)
    ContentElement.GetIndex()
    ContentElement.CloneObject<T>(T)
    ContentElement.CaptureInitialValues()
    ContentElement.Index
    ContentElement.Parent
    ContentElement.Status
    Namespace: IronPPT.Models
    Assembly: IronPPT.dll
    Syntax
    public class Slide : ParentElement, ICloneableElement, IParentElement, ISlide, IGraphic, IContentElement

    Slide is the page object a developer fills with content when building a PowerPoint deck in code. It holds the text, shapes, and images that appear on one slide and exposes the methods that add them, so generating a presentation comes down to creating slides and populating each one.

    A slide is reached through the presentation document's slide collection, then content is added through its Add methods, which fall into clear groups. Text content uses AddText (taking a string or an IText) and AddParagraph; graphics use AddShape and the four AddImage overloads (a path, a Stream, an AnyBitmap, or an existing IImage); and AddChild adds raw content elements. What has been added is read back through the typed collection properties: Texts, Paragraphs, Shapes, Images, and TextBoxes, each a List of the matching interface.

    Layout and identity are separate buckets. Geometry is set through Width, Height (both DocUnit), Position (an ElementPosition), and Angle (a Rotation), so a slide can be sized and oriented in document units rather than raw pixels. Identity and visibility live on ID, IsMasterSlide, Show and ShowMasterPlaceholderAnimations (both Nullable<bool>), and the read-only SlideColor, which reports the slide's resolved color. Set IsMasterSlide when the slide acts as a template for others, and toggle Show to control whether it appears in the rendered deck. Build a slide by adding its content first, then adjust geometry and visibility before saving the deck.

    slide.AddText("Quarterly Report");
    slide.AddImage("logo.png");
    slide.Width = new DocUnit(960, Units.Point);

    The add slide how-to creates slides, the manage slide how-to reorders them, and the slide element tutorial walks through populating one.

    Constructors

    Slide()

    Declaration
    public Slide()

    Slide(IContentElement[])

    Declaration
    public Slide(params IContentElement[] children)
    Parameters
    Type Name Description
    IContentElement[] children

    Properties

    Angle

    Declaration
    public Rotation Angle { get; set; }
    Property Value
    Type Description
    Rotation

    Height

    Declaration
    public DocUnit Height { get; set; }
    Property Value
    Type Description
    DocUnit

    ID

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    Images

    Declaration
    public List<IImage> Images { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<IImage>

    IsMasterSlide

    Declaration
    public bool IsMasterSlide { get; set; }
    Property Value
    Type Description
    System.Boolean

    Paragraphs

    Declaration
    public List<IParagraph> Paragraphs { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<IParagraph>

    Position

    Declaration
    public ElementPosition Position { get; set; }
    Property Value
    Type Description
    ElementPosition

    Shapes

    Declaration
    public List<IShape> Shapes { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<IShape>

    Show

    Declaration
    public Nullable<bool> Show { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>

    ShowMasterPlaceholderAnimations

    Declaration
    public Nullable<bool> ShowMasterPlaceholderAnimations { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Boolean>

    SlideColor

    Declaration
    public IColor SlideColor { get; }
    Property Value
    Type Description
    IColor

    TextBoxes

    Declaration
    public List<ITextBox> TextBoxes { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<ITextBox>

    Texts

    Declaration
    public List<IText> Texts { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<IText>

    Width

    Declaration
    public DocUnit Width { get; set; }
    Property Value
    Type Description
    DocUnit

    Methods

    AddChild(IContentElement[])

    Declaration
    public override void AddChild(params IContentElement[] children)
    Parameters
    Type Name Description
    IContentElement[] children
    Overrides
    ParentElement.AddChild(IContentElement[])

    AddImage(IImage)

    Declaration
    public IImage AddImage(IImage image)
    Parameters
    Type Name Description
    IImage image
    Returns
    Type Description
    IImage

    AddImage(AnyBitmap)

    Declaration
    public IImage AddImage(AnyBitmap anyBitmap)
    Parameters
    Type Name Description
    IronSoftware.Drawing.AnyBitmap anyBitmap
    Returns
    Type Description
    IImage

    AddImage(Stream)

    Declaration
    public IImage AddImage(Stream imageStream)
    Parameters
    Type Name Description
    System.IO.Stream imageStream
    Returns
    Type Description
    IImage

    AddImage(String)

    Declaration
    public IImage AddImage(string imagePath)
    Parameters
    Type Name Description
    System.String imagePath
    Returns
    Type Description
    IImage

    AddParagraph(IParagraph)

    Declaration
    public IParagraph AddParagraph(IParagraph paragraph)
    Parameters
    Type Name Description
    IParagraph paragraph
    Returns
    Type Description
    IParagraph

    AddShape(IShape)

    Declaration
    public IShape AddShape(IShape shape)
    Parameters
    Type Name Description
    IShape shape
    Returns
    Type Description
    IShape

    AddText(IText)

    Declaration
    public IText AddText(IText text)
    Parameters
    Type Name Description
    IText text
    Returns
    Type Description
    IText

    AddText(String)

    Declaration
    public IText AddText(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type Description
    IText

    Implements

    ICloneableElement
    IParentElement
    ISlide
    IGraphic
    IContentElement

    Inherited members

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