GetEffective
ParagraphFormat.GetEffective 方法
获取应用继承的有效段落格式数据。
public IParagraphFormatEffectiveData GetEffective()
返回值
一个 IParagraphFormatEffectiveData
。
示例
此示例演示如何获取一些有效的段落格式属性。
[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
IAutoShape shape = pres.Slides[0].Shapes[0] as IAutoShape;
IParagraphFormatEffectiveData effectiveParagraphFormat = shape.TextFrame.Paragraphs[0].ParagraphFormat.GetEffective();
Console.WriteLine("文本对齐方式: " + effectiveParagraphFormat.Alignment);
Console.WriteLine("缩进: " + effectiveParagraphFormat.Indent);
Console.WriteLine("项目符号类型: " + effectiveParagraphFormat.Bullet.Type);
}