GlobalLayoutSlideCollectionAdd Method

Adds a new layout slide to the presentation.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 20.3.0.0 (20.3)
Syntax
public ILayoutSlide Add(
	IMasterSlide master,
	SlideLayoutType layoutType,
	string layoutName
)

Parameters

master
Type: Aspose.SlidesIMasterSlide
Master slide for a new layout.
layoutType
Type: Aspose.SlidesSlideLayoutType
Layout type for a new layout. Supported layout types: Title, TitleOnly, Blank, TitleAndObject, VerticalText, VerticalTitleAndText, TwoObjects, SectionHeader, TwoTextAndTwoObjects, TitleObjectAndCaption, PictureAndCaption, Custom. Other layout types are not supported now: Text, TwoColumnText, Table, TextAndChart, ChartAndText, Diagram, Chart, TextAndClipArt, ClipArtAndText, TextAndObject, ObjectAndText, Object, TextAndMedia, MediaAndText, ObjectOverText, TextOverObject, TextAndTwoObjects, TwoObjectsAndText, TwoObjectsOverText, FourObjects, ClipArtAndVerticalText, VerticalTitleAndTextOverChart, ObjectAndTwoObject, TwoObjectsAndObject.
layoutName
Type: SystemString
Name for a new layout. If passed name is already in use the ArgumentException will be thrown. If null parameter is passed then name genarated atomatically in regards to passed layout type (for example "Title Slide" or "1_Title Slide", "2_..", etc.).

Return Value

Type: ILayoutSlide
Added slide.

Implements

IGlobalLayoutSlideCollectionAdd(IMasterSlide, SlideLayoutType, String)
Exceptions
ExceptionCondition
NotImplementedException Thrown if unsupported value of parameter layoutType is passed. Layout types that are not supported now: Text, TwoColumnText, Table, TextAndChart, ChartAndText, Diagram, Chart, TextAndClipArt, ClipArtAndText, TextAndObject, ObjectAndText, Object, TextAndMedia, MediaAndText, ObjectOverText, TextOverObject, TextAndTwoObjects, TwoObjectsAndText, TwoObjectsOverText, FourObjects, ClipArtAndVerticalText, VerticalTitleAndTextOverChart, ObjectAndTwoObject, TwoObjectsAndObject.
ArgumentNullException Thrown if master is null.
ArgumentException Thrown if master belongs to the other presentation.
ArgumentException Thrown if layout name value layoutName is already in use in collection of the layouts of master.
Remarks
1) Added layout for value SlideLayoutType.Custom of layoutType contains no placeholders and no shapes. 2) Analogue of this method is method Add(SlideLayoutType, String) accessed with LayoutSlides property.
See Also