Click or drag to resize

SlideCollectionInsertNew Method (Int32, SlideLayoutType)

Inserts a new Slide with a parent template that has a specified type of layout to the collection at the specified index.

Namespace:  GemBox.Presentation
Assembly:  GemBox.Presentation (in GemBox.Presentation.dll) Version: (
public Slide InsertNew(
	int index,
	SlideLayoutType layoutType


Type: SystemInt32
The zero-based index at which new Slide should be inserted.
Type: GemBox.PresentationSlideLayoutType
The type of layout of a parent template of a new Slide.

Return Value

Type: Slide
A new Slide with the specified type of layout inserted to the collection.
ArgumentOutOfRangeExceptionindex is less than zero or index is equal to or greater than Count.

If MasterSlides collection is empty, this method will add a new MasterSlide.

If LayoutSlides collection of the last MasterSlide from the MasterSlides doesn't contain a LayoutSlide with the specified layoutType, then a new LayoutSlide with the specified layoutType will be added.

See Also