AddSmartArt

ShapeCollection.AddSmartArt method

添加SmartArt图表。

public ISmartArt AddSmartArt(float x, float y, float width, float height,  
    SmartArtLayoutType layoutType)  
参数类型描述
xSingle图表框左侧的X坐标。
ySingle图表框左侧的Y坐标。
widthSingle图表框的宽度。
heightSingle图表框的高度。
layoutTypeSmartArtLayoutTypeSmartArt图表的类型

返回值

创建SmartArt图表

示例

以下示例展示了如何在PowerPoint演示文稿中添加智能形状。

[C#]  
using (Presentation pres = new Presentation())  
{  
	Slide slide = pres.Slides[0];  
	SmartArt smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);  
}  

另请参阅