AddSmartArt

IShapeCollection.AddSmartArt 方法

添加 SmartArt 图表。

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

返回值

创建 SmartArt 图表

示例

示例:

[C#]
Presentation pres = new Presentation();
Slide slide = pres.Slides[0];
SmartArt smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
[Visual Basic]
Private pres As New Presentation()
Private slide As Slide = pres.Slides(0)
Private smart As SmartArt = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList)

另见