ShapeCollection

ShapeCollection class

Represents a collection of shapes.

public sealed class ShapeCollection : DomObject<GroupShape>, IShapeCollection

Properties

NameDescription
Count { get; }Gets the number of elements actually contained in the collection. Read-only Int32.
IsSynchronized { get; }Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only Boolean.
Item { get; }Gets the element at the specified index. Read-only IShape.
ParentGroup { get; }Gets the parent group shape object for the shapes collection. Read-only IGroupShape.
SyncRoot { get; }Returns a synchronization root. Read-only Object.

Methods

NameDescription
AddAudioFrameCD(float, float, float, float)Creates a new audio frame linked to a CD track and adds it to the end of the shape collection.
AddAudioFrameEmbedded(float, float, float, float, IAudio)Creates a new audio frame and adds it to the end of the shape collection using an existing audio object from the Presentation.Audios list.
AddAudioFrameEmbedded(float, float, float, float, Stream)Creates a new audio frame with an embedded WAV file and adds it to the end of the shape collection. The embedded audio is added to the Presentation.Audios collection.
AddAudioFrameLinked(float, float, float, float, string)Creates a new audio frame linked to an external audio file and adds it to the end of the shape collection.
AddAutoShape(ShapeType, float, float, float, float)Creates a new auto shape with default formatting and adds it to the end of the shape collection.
AddAutoShape(ShapeType, float, float, float, float, bool)Creates a new auto shape and adds it to the end of the shape collection, optionally initializing it with default template formatting.
AddChart(ChartType, float, float, float, float)Creates a new chart, initializes it with sample series data and settings, and adds it to the end of the shape collection.
AddChart(ChartType, float, float, float, float, bool)Creates a new chart, initializes it with sample series data and settings, and adds it to the end of the shape collection.
AddClone(IShape)Creates a copy of the specified shape and adds it to the end of the shape collection. The cloned shape retains the original’s position and size.
AddClone(IShape, float, float)Creates a copy of the specified shape and adds it to the end of the shape collection. The new shape retains the width and height of the sourceShape.
AddClone(IShape, float, float, float, float)Creates a copy of the specified shape and adds it to the end of the shape collection.
AddConnector(ShapeType, float, float, float, float)Creates a new connector shape with default template styling and adds it to the end of the shape collection.
AddConnector(ShapeType, float, float, float, float, bool)Creates a new connector shape and adds it to the end of the shape collection, optionally applying default template styling.
AddGroupShape()Creates a new empty group shape and adds it to the end of the shape collection. The group’s frame will automatically adjust to fit any shapes added to it.
AddGroupShape(ISvgImage, float, float, float, float)Creates a new group shape, converts the specified SVG image into individual shapes, and adds the resulting group to the end of the shape collection.
AddMathShape(float, float, float, float)Creates a new rectangle auto shape to host mathematical content and adds it to the end of the shape collection.
AddOleObjectFrame(float, float, float, float, IOleEmbeddedDataInfo)Creates a new OLE object frame and adds it to the end of the shape collection.
AddOleObjectFrame(float, float, float, float, string, string)Creates a new OLE object frame and adds it to the end of the shape collection.
AddPictureFrame(ShapeType, float, float, float, float, IPPImage)Creates a new picture frame containing the specified image and adds it to the end of the shape collection.
AddSectionZoomFrame(float, float, float, float, ISection)Creates a new Section Zoom frame and adds it to the end of the shape collection.
AddSectionZoomFrame(float, float, float, float, ISection, IPPImage)Creates a new Section Zoom frame with a predefined image and adds it to the end of the shape collection.
AddSmartArt(float, float, float, float, SmartArtLayoutType)Creates a SmartArt diagram and adds it to the end of the shape collection.
AddSummaryZoomFrame(float, float, float, float)Creates a new Summary Zoom frame and adds it to the end of the shape collection.
AddTable(float, float, double[], double[])Creates a new table and adds it to the end of the shape collection.
AddVideoFrame(float, float, float, float, IVideo)Creates a new video frame and adds it to the end of the shape collection.
AddVideoFrame(float, float, float, float, string)Creates a new video frame and adds it to the end of the shape collection.
AddZoomFrame(float, float, float, float, ISlide)Creates a new Zoom frame and adds it to the end of the shape collection.
AddZoomFrame(float, float, float, float, ISlide, IPPImage)Creates a new Zoom frame and adds it to the end of the shape collection.
Clear()Removes all shapes from the shape collection.
CopyTo(Array, int)Copies all elements from the collection to the specified array.
GetEnumerator()Returns an enumerator that iterates through the collection.
IndexOf(IShape)Returns the zero-based index of the first occurrence of the specified shape in the collection.
InsertAudioFrameCD(int, float, float, float, float)Creates a new audio frame linked to a CD track and inserts it into the shape collection at the specified index.
InsertAudioFrameEmbedded(int, float, float, float, float, IAudio)Creates a new audio frame and inserts it into the shape collection at the specified index using an existing audio object from the Presentation.Audios list.
InsertAudioFrameEmbedded(int, float, float, float, float, Stream)Creates a new audio frame with an embedded WAV file and inserts it into the shape collection at the specified index. The embedded audio is added to the Presentation.Audios collection.
InsertAudioFrameLinked(int, float, float, float, float, string)Creates a new audio frame linked to an external audio file and inserts it into the shape collection at the specified index.
InsertAutoShape(int, ShapeType, float, float, float, float)Creates a new auto shape and inserts it into the shape collection at the specified index, applying default template formatting.
InsertAutoShape(int, ShapeType, float, float, float, float, bool)Creates a new auto shape and inserts it into the shape collection at the specified index, optionally initializing it with default template styling.
InsertChart(ChartType, float, float, float, float, int)Creates a new chart, initializes it with sample series data and settings, and inserts it into the shape collection at the specified index.
InsertChart(ChartType, float, float, float, float, int, bool)Creates a new chart, initializes it with sample series data and settings, and inserts it into the shape collection at the specified index.
InsertClone(int, IShape)Creates a copy of the specified shape and inserts it into the shape collection at the specified index. The cloned shape retains the original’s position and size.
InsertClone(int, IShape, float, float)Creates a copy of the specified shape and inserts it into the shape collection at the specified index. The new shape retains the width and height of the sourceShape.
InsertClone(int, IShape, float, float, float, float)Creates a copy of the specified shape and inserts it into the shape collection at the specified index.
InsertConnector(int, ShapeType, float, float, float, float)Creates a new connector shape and inserts it into the shape collection at the specified index, applying default template styling.
InsertConnector(int, ShapeType, float, float, float, float, bool)Creates a new connector shape and inserts it into the shape collection at the specified index, optionally applying default template styling.
InsertGroupShape(int)Creates a new empty group shape and inserts it to the shape collection at the specified index. The group’s frame will automatically adjust to fit any shapes added to it.
InsertOleObjectFrame(int, float, float, float, float, IOleEmbeddedDataInfo)Creates a new OLE object frame and inserts it into the shape collection at the specified index.
InsertOleObjectFrame(int, float, float, float, float, string, string)Creates a new OLE object frame and inserts it into the shape collection at the specified index.
InsertPictureFrame(int, ShapeType, float, float, float, float, IPPImage)Creates a new picture frame containing the specified image and inserts it into the shape collection at the specified index.
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.
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.
InsertSummaryZoomFrame(int, float, float, float, float)Creates a new Summary Zoom frame and inserts it into the shape collection at the specified index.
InsertTable(int, float, float, double[], double[])Creates a new table and inserts it into the shape collection at the specified index.
InsertVideoFrame(int, float, float, float, float, string)Creates a new video frame and inserts it into the shape collection at the specified index.
InsertZoomFrame(int, float, float, float, float, ISlide)Creates a new Zoom frame and inserts it into the shape collection at the specified index.
InsertZoomFrame(int, float, float, float, float, ISlide, IPPImage)Creates a new Zoom frame with a predefined image and inserts it into the shape collection at the specified index.
Remove(IShape)Removes the first occurrence of the specified shape from the shape collection.
RemoveAt(int)Removes the shape at the specified index from the shape collection.
Reorder(int, IShape)Moves the specified shape to a new position within the shape collection.
Reorder(int, params IShape[])Moves the specified shapes within the shape collection, placing them starting at the given index.
ToArray()Creates and returns an array that contains all shapes.
ToArray(int, int)Creates and returns an array that contains all shapes in the specified range.

See Also