IRawElementProviderFragment.FragmentRoot プロパティ

定義

フラグメントのルート ノードを取得します。

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 返す必要があります。

適用対象

こちらもご覧ください