获取 UI 层次结构中给定元素的父级。
命名空间:  Microsoft.VisualStudio.TestTools.UITest.Extension
程序集:  Microsoft.VisualStudio.TestTools.UITest.Extension(在 Microsoft.VisualStudio.TestTools.UITest.Extension.dll 中)
语法
声明
Public MustOverride Function GetParent ( _
    element As IUITechnologyElement _
) As IUITechnologyElement
public abstract IUITechnologyElement GetParent(
    IUITechnologyElement element
)
public:
virtual IUITechnologyElement^ GetParent(
    IUITechnologyElement^ element
) abstract
abstract GetParent : 
        element:IUITechnologyElement -> IUITechnologyElement 
public abstract function GetParent(
    element : IUITechnologyElement
) : IUITechnologyElement
参数
- element
 类型:Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
 一个 IUITechnologyElement 对象。
返回值
类型:Microsoft.VisualStudio.TestTools.UITest.Extension.IUITechnologyElement
父元素。
实现
IUITechnologyManager.GetParent(IUITechnologyElement)
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。