Articles in this section
Category / Section

How to use predefined slide layout types in .NET WebForms ?

6 mins read
NET WebForms Presentation

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)

 

 

Conclusion

I hope you enjoyed learning about how to use predefined slide layout types in .NET WebForms.

You can refer to our NETWebForms Presentation  page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!



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