AddVerticalContentPlaceholder

ILayoutPlaceholderManager.AddVerticalContentPlaceholder 方法

添加一个新的占位符形状到布局幻灯片,以垂直方向容纳内容,例如图片、表格、媒体或文本。

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

返回值

创建的 IAutoShape 具有内容(垂直)占位符。

示例

以下示例演示如何将内容(垂直)占位符形状添加到布局幻灯片。

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

另请参阅