InsertSectionZoomFrame

InsertSectionZoomFrame(int, float, float, float, float, ISection)

Creates a new Section Zoom frame and inserts it into to the shape collection at the specified index.

public ISectionZoomFrame InsertSectionZoomFrame(int index, float x, float y, float width, 
    float height, ISection section)
ParameterTypeDescription
indexInt32The zero-based index at which to insert the Section Zoom frame.
xSingleThe x-coordinate of the new Section Zoom frame, in points.
ySingleThe y-coordinate of the new Section Zoom frame, in points.
widthSingleThe width of the new Section Zoom frame, in points.
heightSingleThe height of the new Section Zoom frame, in points.
sectionISectionThe ISection referenced by the Section Zoom frame; must belong to this presentation and contain at least one slide.

Return Value

The newly created ISectionZoomFrame.

Exceptions

exceptioncondition
ArgumentExceptionThrown if the referenced section does not belong to the current presentation or contains no slides.

Examples

This example demonstrates the creation and inserting a Section Zoom object at the specified index of a collection (assume that there are at least two sections in the “Presentation.pptx” presentation):

[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
    ISectionZoomFrame zoomFrame = pres.Slides[0].Shapes.InsertSectionZoomFrame(2, 150, 20, 50, 50, pres.Sections[1]);
}

See Also


InsertSectionZoomFrame(int, float, float, float, float, ISection, IPPImage)

Creates a new Section Zoom frame with a predefined image and inserts it into to the shape collection at the specified index.

public ISectionZoomFrame InsertSectionZoomFrame(int index, float x, float y, float width, 
    float height, ISection section, IPPImage image)
ParameterTypeDescription
indexInt32The zero-based index at which to insert the Section Zoom frame.
xSingleThe x-coordinate of the new Section Zoom frame, in points.
ySingleThe y-coordinate of the new Section Zoom frame, in points.
widthSingleThe width of the new Section Zoom frame, in points.
heightSingleThe height of the new Section Zoom frame, in points.
sectionISectionThe ISection referenced by the Section Zoom frame; must belong to this presentation and contain at least one slide.
imageIPPImageThe image to display within the Section Zoom frame.

Return Value

The newly created ISectionZoomFrame.

Exceptions

exceptioncondition
ArgumentExceptionThrown if the referenced section does not belong to the current presentation or contains no slides.

Examples

This example demonstrates the creation and inserting a Section Zoom object at the specified index of a collection (assume that there are at least two sections in the “Presentation.pptx” presentation):

[C#]
using (Presentation pres = new Presentation("Presentation.pptx"))
{
    IPPImage image = pres.Images.AddImage(Image.FromFile("image.png"));
    ISectionZoomFrame zoomFrame = pres.Slides[0].Shapes.InsertSectionZoomFrame(2, 150, 20, 50, 50, pres.Sections[1], image);
}

See Also