AddZoomFrame

AddZoomFrame(float, float, float, float, ISlide)

Creates a new Zoom frame and adds it to the end of the shape collection.

public IZoomFrame AddZoomFrame(float x, float y, float width, float height, ISlide slide)
ParameterTypeDescription
xSingleThe x-coordinate of the new Zoom frame, in points.
ySingleThe y-coordinate of the new Zoom frame, in points.
widthSingleThe width of the new Zoom frame, in points.
heightSingleThe height of the new Zoom frame, in points.
slideISlideThe ISlide referenced by the Zoom frame; must belong to this presentation.

Return Value

The newly created IZoomFrame.

Exceptions

exceptioncondition
ArgumentExceptionThrown if the referenced slide does not belong to the current presentation.

Examples

This example demonstrates adding a Zoom object to the end of a collection (assume that there are at least two slides in the “Presentation.pptx” presentation):

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

See Also


AddZoomFrame(float, float, float, float, ISlide, IPPImage)

Creates a new Zoom frame and adds it to the end of the shape collection.

public IZoomFrame AddZoomFrame(float x, float y, float width, float height, ISlide slide, 
    IPPImage image)
ParameterTypeDescription
xSingleThe x-coordinate of the new Zoom frame, in points.
ySingleThe y-coordinate of the new Zoom frame, in points.
widthSingleThe width of the new Zoom frame, in points.
heightSingleThe height of the new Zoom frame, in points.
slideISlideThe ISlide referenced by the Zoom frame; must belong to this presentation.
imageIPPImageThe image for the referenced slide IPPImage.

Return Value

The newly created IZoomFrame.

Exceptions

exceptioncondition
ArgumentExceptionThrown if the referenced slide does not belong to the current presentation.

Examples

This example demonstrates adding a Zoom object to the end of a collection (assume that there are at least two slides in the “Presentation.pptx” presentation):

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

See Also