AddTextPlaceholder
ILayoutPlaceholderManager.AddTextPlaceholder 方法
向布局幻灯片添加一个新的占位符形状以容纳文本内容。
public IAutoShape AddTextPlaceholder(float x, float y, float width, float height)
参数 | 类型 | 描述 |
---|---|---|
x | Single | 新占位符形状的 X 坐标。 |
y | Single | 新占位符形状的 Y 坐标。 |
width | Single | 新占位符形状的宽度。 |
height | Single | 新占位符形状的高度。 |
返回值
创建的 IAutoShape
,具有文本占位符。
示例
以下示例演示如何向布局幻灯片添加文本占位符形状。
[C#]
using (Presentation pres = new Presentation())
{
ILayoutSlide layout = pres.LayoutSlides.GetByType(SlideLayoutType.Blank);
IAutoShape placeholder = layout.PlaceholderManager.AddTextPlaceholder(20, 20, 500, 300);
}
另请参阅
- interface IAutoShape
- interface ILayoutPlaceholderManager
- namespace Aspose.Slides
- assembly Aspose.Slides