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: 21.3.35.1045 (21.3.35.1045)
Syntax
public Slide InsertNew(
	int index,
	SlideLayoutType layoutType
)

Parameters

index
Type: SystemInt32
The zero-based index at which new Slide should be inserted.
layoutType
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.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionindex is less than zero or index is equal to or greater than Count.
Remarks

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