Articles in this section
Category / Section

How to use predefined slide layout types in Xamarin ?

1 min read

We can add predefined slide layouts while creating a PowerPoint slide. The below code snippets and screenshots demonstrates how to do this with our Presentation library.

1.Adding comparison layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with comparison layout type
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.Comparison);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
' Add the slide to presentation with comparison layout type
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.Comparison)

 

 

 

2.Adding content with caption layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with content with caption layout type
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.ContentWithCaption);

 

 

 
'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with content with caption layout type
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.ContentWithCaption)

 

 

 

3.Adding custom layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with custom layout type
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.Custom);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with custom layout type
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.Custom)

 

 

4.Adding picture with caption layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with picture with caption layout type
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.PictureWithCaption);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with picture with caption layout type 
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.PictureWithCaption)

 

 

5.Adding section header layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with section header layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.SectionHeader);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with section header layout type 
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.SectionHeader)

 

 

6.Adding title layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with title layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.Title);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with title layout type 
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.Title)

 

 

7.Adding title and content layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with title and content layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.TitleAndContent);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with title and content layout type
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.TitleAndContent)

 

 

8.Adding title and vertical text layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with title and vertical text layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.TitleAndVerticalText);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with title and vertical text layout type
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.TitleAndVerticalText)

 

 

9.Adding title only layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with title only layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.TitleOnly);

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with title only layout type 
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.TitleOnly)

 

 

10.Adding two content layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with two content layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.TwoContent);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with two content layout type 
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.TwoContent)

 

 

11.Adding vertical title and text layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with vertical title and text layout type 
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.VerticalTitleAndText);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with vertical title and text layout type 
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.VerticalTitleAndText)

 

 

12.Adding blank layout type

 

//Create a presentation 
IPresentation presentationDoc = Presentation.Create();
//Add the slide to presentation with blank layout type
ISlide slide = presentationDoc.Slides.Add(SlideLayoutType.Blank);

 

'Create a presentation
Dim presentationDoc As IPresentation = Presentation.Create()
'Add the slide to presentation with blank layout type
Dim slide As ISlide = presentationDoc.Slides.Add(SlideLayoutType.Blank)

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied