AddSmartArtPlaceholder

LayoutPlaceholderManager.AddSmartArtPlaceholder 方法

在布局幻灯片中添加一个新的占位符形状以放置SmartArt图表。

public IAutoShape AddSmartArtPlaceholder(float x, float y, float width, float height)
参数类型描述
x单精度浮点数新占位符形状的X坐标。
y单精度浮点数新占位符形状的Y坐标。
width单精度浮点数新占位符形状的宽度。
height单精度浮点数新占位符形状的高度。

返回值

创建的 IAutoShape,带有SmartArt占位符。

示例

以下示例展示了如何将SmartArt占位符形状添加到布局幻灯片中。

[C#]
using (Presentation pres = new Presentation())
{
	ILayoutSlide layout = pres.LayoutSlides.GetByType(SlideLayoutType.Blank);
	IAutoShape placeholder = layout.PlaceholderManager.AddSmartArtPlaceholder(20, 20, 200, 200);
}

另请参见