menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface ISlide - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface ISlide

    Represents the slide in the presentation.

    Inherited Members
    IBaseSlide.Background
    IBaseSlide.Charts
    IBaseSlide.Find(Regex)
    IBaseSlide.Find(String, Boolean, Boolean)
    IBaseSlide.FindAll(Regex)
    IBaseSlide.FindAll(String, Boolean, Boolean)
    IBaseSlide.GroupShapes
    IBaseSlide.HeadersFooters
    IBaseSlide.Name
    IBaseSlide.Pictures
    IBaseSlide.Shapes
    IBaseSlide.SlideSize
    IBaseSlide.SlideTransition
    IBaseSlide.Tables
    IBaseSlide.Timeline
    Namespace: Syncfusion.Presentation
    Assembly: Syncfusion.Presentation.UWP.dll
    Syntax
    public interface ISlide : IBaseSlide

    Properties

    Comments

    Returns the collection of slide comments. Read-only.

    Declaration
    IComments Comments { get; }
    Property Value
    Type
    IComments
    Examples
    //Create a new presentation.
    IPresentation presDoc = Presentation.Create();
    //Add a blank slide to the presentation.
    ISlide slide = presDoc.Slides.Add(SlideLayoutType.Blank);
    //Add a text box to the slide
    IShape shape = slide.Shapes.AddTextBox(100, 150, 300, 200);
    //Add a paragraph to the textbody of the shape
    shape.TextBody.AddParagraph("Hi Syncfusion Customers");
    //Add a comment to the slide
    IComment comment = slide.Comments.Add(0.35, 0.04, "Author1", "A1", "Essential Presentation is available from 13.1 versions of Essential Studio", DateTime.Now);
    //Author2 add reply to a parent comment
    slide.Comments.Add("Author2", "A2", "Does it support rendering of slides as images or PDF?", DateTime.Now, comment);             
    //Get the collection of the comments
    IComments comments = slide.Comments;
    //Save the presentation to the file system.
    presDoc.Save("Output.pptx");
    //Close the presentation
    presDoc.Close();
         
     Dim presDoc As IPresentation = Presentation.Create()
     ‘Add slide to the presentation
     Dim slide As ISlide = presDoc.Slides.Add(SlideLayoutType.Blank)
     ‘Add table to the slide
     Dim table As ITable = slide.Shapes.AddTable(2, 2, 100, 120, 300, 200)
     'Add a text box to the slide
     Dim shape As IShape = slide.Shapes.AddTextBox(100, 150, 300, 200)
     'Add a paragraph to the text body of the shape
     shape.TextBody.AddParagraph()
     'Add a comment to the slide
     Dim comment As IComment = slide.Comments.Add(0.35, 0.04, "Author1", "A1", "Essential Presentation is available from 13.1 versions of Essential Studio", DateTime.Now);
     'Author2 add reply to a parent comment
     slide.Comments.Add("Author2", "A2", "Does it support rendering of slides as images or PDF?", DateTime.Now, comment);             
     'Get the collection of the comments
     Dim comments As IComments = slide.Comments;
     ‘Save the presentation
     presDoc.Save("Sample.pptx")
     ‘Close the presentation
     presDoc.Close()

    LayoutSlide

    Gets the layout slide instance of current slide.

    Declaration
    ILayoutSlide LayoutSlide { get; }
    Property Value
    Type
    ILayoutSlide

    NotesSlide

    Gets the current notes slide instance. Returns null if no notes are present.

    Declaration
    INotesSlide NotesSlide { get; }
    Property Value
    Type
    INotesSlide

    Section

    Returns the section instance of the slide. Read-only.

    Declaration
    ISection Section { get; }
    Property Value
    Type
    ISection

    SlideID

    Gets the Unique ID for the current slide. Read-only. The Unique ID ranges from 256 to 2147483647.

    Declaration
    uint SlideID { get; }
    Property Value
    Type
    System.UInt32

    SlideNumber

    Gets the number of the current slide. Read-only.

    Declaration
    int SlideNumber { get; }
    Property Value
    Type
    System.Int32

    Visible

    Gets or sets the boolean value which indicates whether the slide is visible or not.

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

    true if this slide instance is visible; otherwise, false.

    Examples
    //Create a new presentation.
    IPresentation presentation = Presentation.Create();
    //Add a blank slide to the presentation.
    ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
    //Hide the slide in presentation
    slide.Visible = false;
    //Save the presentation
    presentation.Save("Sample.pptx");
    //Close the presentation
    presentation.Close();
    'Create a new presentation.
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add a blank slide to the presentation.
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Hide the slide in presentation
    slide.Visible = False
    'Save the presentation
    presentation__1.Save("Sample.pptx")
    'Close the presentation
    presentation__1.Close()

    Methods

    AddNotesSlide()

    Adds a new notes to the slide.

    Declaration
    INotesSlide AddNotesSlide()
    Returns
    Type Description
    INotesSlide

    Returns the notes slide of INotesSlide instance.

    AddTextBox(Double, Double, Double, Double)

    Adds a text box to the slide.

    Declaration
    IShape AddTextBox(double left, double top, double width, double height)
    Parameters
    Type Name Description
    System.Double left

    Represents the left position,in points. The Left value ranges from -169056 to 169056.

    System.Double top

    Represents the top position,in points. The Top value ranges from -169056 to 169056.

    System.Double width

    Represents the width,in points. The Width value ranges from 0 to 169056.

    System.Double height

    Represents the height,in points. The Height value ranges from 0 to 169056.

    Returns
    Type Description
    IShape

    Returns an IShape instance that represents the text box.

    Examples
     //Create a new presentation.
     IPresentation presentation = Presentation.Create();
     //Add a new slide to the presentation.
     ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
     //Add a text box to the slide.
     IShape shape = slide.AddTextBox(10, 10, 300, 350);
     //Add a paragraph with text content to the shape.
     shape.TextBody.AddParagraph("This is a new text box");
     //Save the presentation.
     presentation.Save("Slide_TextBox.pptx");
     //Close the presentation.
     presentation.Close();
    'Create a new presentation.
    Dim presentation__1 As IPresentation = Presentation.Create()
    'Add a new slide to the presentation.
    Dim slide As ISlide = presentation__1.Slides.Add(SlideLayoutType.Blank)
    'Add a text box to the slide.
    Dim shape As IShape = slide.AddTextBox(10, 10, 300, 350)
    'Add a paragraph with text content to the shape.
    shape.TextBody.AddParagraph("This is a new text box")
    'Save the presentation.
    presentation__1.Save("Slide_TextBox.pptx")
    'Close the presentation.
    presentation__1.Close()

    Clone()

    Creates an independent copy of ISlide instance.

    Declaration
    ISlide Clone()
    Returns
    Type Description
    ISlide

    Returns the cloned slide instance.

    Examples
    //Open an existing presentation.
    IPresentation presentation = Presentation.Open("Presentation.pptx");
    //Retrieve the slide instance.
    ISlide slide = presentation.Slides[0];
    //Create a cloned copy of slide.
    ISlide slideClone = slide.Clone();
    //Add a new text box to the cloned slide.
    IShape textboxShape = slideClone.AddTextBox(0, 0, 250, 250);
    //Add a paragraph with text content to the shape.
    textboxShape.TextBody.AddParagraph("Hello Presentation");
    //Add the slide to the presentation.
    presentation.Slides.Add(slideClone);
    //Save the presentation to the file system.
    presentation.Save("Output.pptx");
    //Close the presentation
    presentation.Close();
    'Open an existing presentation.
    Dim presentation__1 As IPresentation = Presentation.Open("Presentation.pptx")
    'Retrieve the slide instance.
    Dim slide As ISlide = presentation__1.Slides(0)
    'Create a cloned copy of slide.
    Dim slideClone As ISlide = slide.Clone()
    'Add a new text box to the cloned slide.
    Dim textboxShape As IShape = slideClone.AddTextBox(0, 0, 250, 250)
    'Add a paragraph with text content to the shape.
    textboxShape.TextBody.AddParagraph("Hello Presentation")
    'Add the slide to the presentation.
    presentation__1.Slides.Add(slideClone)
    'Save the presentation to the file system.
    presentation__1.Save("Output.pptx")
    'Close the presentation
    presentation__1.Close()

    MoveToSection(Int32)

    Moves the slide to the start of the specified section index.

    Declaration
    void MoveToSection(int sectionIndex)
    Parameters
    Type Name Description
    System.Int32 sectionIndex

    Specifies the section index to be moved.

    RemoveNotesSlide()

    Removes the notes slide.

    Declaration
    void RemoveNotesSlide()

    SaveAsImageAsync(Stream)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream
    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>
    Remarks

    Use Windows Runtime Streams for UWP apps. For more information, kindly refer https://msdn.microsoft.com/en-us/library/dn531021(v=vs.110).aspx

    SaveAsImageAsync(Stream, RenderingOptions)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(Stream stream, RenderingOptions renderingOptions)
    Parameters
    Type Name Description
    System.IO.Stream stream
    RenderingOptions renderingOptions
    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>
    Remarks

    Use Windows Runtime Streams for UWP apps. For more information, kindly refer https://msdn.microsoft.com/en-us/library/dn531021(v=vs.110).aspx

    SaveAsImageAsync(Stream, RenderingOptions, CancellationToken)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(Stream stream, RenderingOptions renderingOptions, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.IO.Stream stream
    RenderingOptions renderingOptions
    System.Threading.CancellationToken cancellationToken

    Specifies whether cancellation has been requested for this task.

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>
    Remarks

    Use Windows Runtime Streams for UWP apps. For more information, kindly refer https://msdn.microsoft.com/en-us/library/dn531021(v=vs.110).aspx

    SaveAsImageAsync(Stream, CancellationToken)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(Stream stream, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.IO.Stream stream
    System.Threading.CancellationToken cancellationToken

    Specifies whether cancellation has been requested for this task.

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>
    Remarks

    Use Windows Runtime Streams for UWP apps. For more information, kindly refer https://msdn.microsoft.com/en-us/library/dn531021(v=vs.110).aspx

    SaveAsImageAsync(StorageFile)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(StorageFile storageFile)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile
    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    SaveAsImageAsync(StorageFile, RenderingOptions)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(StorageFile storageFile, RenderingOptions renderingOptions)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile
    RenderingOptions renderingOptions
    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    SaveAsImageAsync(StorageFile, RenderingOptions, CancellationToken)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(StorageFile storageFile, RenderingOptions renderingOptions, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile
    RenderingOptions renderingOptions
    System.Threading.CancellationToken cancellationToken

    Specifies whether cancellation has been requested for this task.

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    SaveAsImageAsync(StorageFile, CancellationToken)

    Converts the slide to image

    Declaration
    Task<bool> SaveAsImageAsync(StorageFile storageFile, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    Windows.Storage.StorageFile storageFile
    System.Threading.CancellationToken cancellationToken

    Specifies whether cancellation has been requested for this task.

    Returns
    Type
    System.Threading.Tasks.Task<System.Boolean>

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved