GetEffective

TextFrameFormat.GetEffective 方法

获取应用继承的有效文本框格式数据。

public ITextFrameFormatEffectiveData GetEffective()

返回值

一个 ITextFrameFormatEffectiveData

示例

此示例演示获取一些有效文本框格式属性。

[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
    IAutoShape shape = pres.Slides[0].Shapes[0] as IAutoShape;
    ITextFrameFormatEffectiveData effectiveTextFrameFormat = shape.TextFrame.TextFrameFormat.GetEffective();
   
    Console.WriteLine("锚定类型: " + effectiveTextFrameFormat.AnchoringType);
    Console.WriteLine("自动调整类型: " + effectiveTextFrameFormat.AutofitType);
    Console.WriteLine("文本垂直类型: " + effectiveTextFrameFormat.TextVerticalType);
    Console.WriteLine("边距");
    Console.WriteLine("   左: " + effectiveTextFrameFormat.MarginLeft);
    Console.WriteLine("   上: " + effectiveTextFrameFormat.MarginTop);
    Console.WriteLine("   右: " + effectiveTextFrameFormat.MarginRight);
    Console.WriteLine("   下: " + effectiveTextFrameFormat.MarginBottom);
}

另请参阅