Interface ISlideSize
Represents the size and bounds of a slide.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface ISlideSize
Properties
Height
Gets the height, in points. Read-only.
Declaration
double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The height of the slide. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Create instance for slide size
ISlideSize slideSize = slide.SlideSize;
//Get the height of the slide size, read only
double height = slideSize.Height;
//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)
'Create instance for slide size
Dim slideSize As ISlideSize = slide.SlideSize
'Get the height of the slide size, read only
Dim height As Double = slideSize.Height
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
SlideOrientation
Gets or sets the slide orientation.
Declaration
SlideOrientation SlideOrientation { get; set; }
Property Value
Type | Description |
---|---|
SlideOrientation |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Create instance for slide size
ISlideSize slideSize = slide.SlideSize;
//Retrieve the slide orientation
SlideOrientation slideOrientation = slideSize.SlideOrientation;
//Set the slide orientation
slideOrientation = SlideOrientation.Landscape;
//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)
'Create instance for slide size
Dim slideSize As ISlideSize = slide.SlideSize
'Retrieve the slide orientation
Dim slideOrientation__2 As SlideOrientation = slideSize.SlideOrientation
'Set the slide orientation
slideOrientation__2 = SlideOrientation.Landscape
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Type
Gets or sets the predefined size type.
Declaration
SlideSizeType Type { get; set; }
Property Value
Type | Description |
---|---|
SlideSizeType | The slide size type of the slide. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Create instance for slide size
ISlideSize slideSize = slide.SlideSize;
//Set the type of slide size
slideSize.Type = SlideSizeType.Banner;
//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)
'Create instance for slide size
Dim slideSize As ISlideSize = slide.SlideSize
'Set the type of slide size
slideSize.Type = SlideSizeType.Banner
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()
Width
Gets the width, in points. Read-only.
Declaration
double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the slide. |
Examples
//Create a new presentation.
IPresentation presentation = Presentation.Create();
//Add a blank slide to the presentation.
ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank);
//Create instance for slide size
ISlideSize slideSize = slide.SlideSize;
//Get the width of the slide size, read only
double width = slideSize.Width;
//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)
'Create instance for slide size
Dim slideSize As ISlideSize = slide.SlideSize
'Get the width of the slide size, read only
Dim width As Double = slideSize.Width
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation
presentation__1.Close()