IRawElementProviderFragment.FragmentRoot 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索该片段的根节点。
public:
property System::Windows::Automation::Provider::IRawElementProviderFragmentRoot ^ FragmentRoot { System::Windows::Automation::Provider::IRawElementProviderFragmentRoot ^ get(); };
public System.Windows.Automation.Provider.IRawElementProviderFragmentRoot FragmentRoot { get; }
member this.FragmentRoot : System.Windows.Automation.Provider.IRawElementProviderFragmentRoot
Public ReadOnly Property FragmentRoot As IRawElementProviderFragmentRoot
属性值
根节点
示例
下面的代码示例演示片段中元素的实现,例如列表框中的列表项。
/// <summary>
/// Gets the root of this fragment.
/// </summary>
/// <remarks>
/// parentControl is the automation provider for the root fragment. In other cases,
/// the parent element might not be the root.
/// </remarks>
public IRawElementProviderFragmentRoot FragmentRoot
{
get
{
return (IRawElementProviderFragmentRoot)parentControl;
}
}
''' <summary>
''' Gets the root of this fragment.
''' </summary>
''' <remarks>
''' parentControl is the automation provider for the root fragment. In other cases,
''' the parent element might not be the root.
''' </remarks>
Public ReadOnly Property FragmentRoot() As IRawElementProviderFragmentRoot _
Implements IRawElementProviderFragment.FragmentRoot
Get
Return DirectCast(parentControl, IRawElementProviderFragmentRoot)
End Get
End Property
注解
实现 的 IRawElementProviderFragmentRoot 提供程序应返回自身。