Interface ISmartArtShapes
Represents the collection of shapes within a SmartArt node.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.Base.dll
Syntax
public interface ISmartArtShapes : IEnumerable<ISmartArtShape>, IEnumerable
Properties
Item[Int32]
Gets a ISmartArtShape instance at the specified index from the collection. Read-only.
Declaration
ISmartArtShape this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Determines the index of the SmartArt shape. |
Property Value
Type | Description |
---|---|
ISmartArtShape | Returns an ISmartArtShape instance. |
Examples
// Create an instance of PowerPoint Presentation
IPresentation pptxDoc = Presentation.Create();
//Add a blank slide to the Presentation
ISlide slide = pptxDoc.Slides.Add(SlideLayoutType.Blank);
//Add a BasicBlockList SmartArt to the slide at the specified size and position.
ISmartArt smartArt = slide.Shapes.AddSmartArt(SmartArtType.BasicBlockList, 0, 0, 640, 426);
//Gets the smart art shape collection from the node.
ISmartArtShapes smartArts = smartArt.Nodes[0].Shapes;
//Gets the first smart art shape from the collection.
ISmartArtShape smartArtShape = smartArts[0];
//Sets the fill color for the shape.
smartArtShape.Fill.SolidFill.Color = ColorObject.DarkCyan;
//Save the PowerPoint Presentation.
pptxDoc.Save("Sample.pptx");
//Close the Presentation
pptxDoc.Close();
'Create an instance of PowerPoint Presentation
Dim pptxDoc As IPresentation = Presentation.Create()
'Add a blank slide to the Presentation
Dim slide As ISlide = pptxDoc.Slides.Add(SlideLayoutType.Blank)
'Add a BasicBlockList SmartArt to the slide at the specified size and position.
Dim smartArt As ISmartArt = slide.Shapes.AddSmartArt(SmartArtType.BasicBlockList, 0, 0, 640, 426)
'Gets the smart art shape collection from the node.
Dim smartArts As ISmartArtShapes = smartArt.Nodes(0).Shapes
'Gets the first smart art shape from the collection.
Dim smartArtShape As ISmartArtShape = smartArts(0)
'Sets the fill color for the shape.
smartArtShape.Fill.SolidFill.Color = ColorObject.DarkCyan
'Save the PowerPoint Presentation.
pptxDoc.Save("Sample.pptx")
'Close the Presentation
pptxDoc.Close()