ParentShape

ITextFrame.ParentShape 属性

返回父形状,如果父对象不实现 IShape 接口则返回 null 只读 IShape

public IShape ParentShape { get; }

示例

以下代码示例显示

[C#]
using (Presentation presentation = new Presentation("SomePresentation.pptx"))
{
    AutoShape autoShape = (AutoShape)presentation.Slides[0].Shapes[0];
    
    Assert.IsTrue(autoShape.TextFrame.ParentShape == autoShape);
    // ...
}

另见