IRawElementProviderFragment.FragmentRoot Property

Definition

Retrieves the root node of the fragment.

C#
public System.Windows.Automation.Provider.IRawElementProviderFragmentRoot FragmentRoot { get; }

Property Value

The root node.

Examples

The following code example shows an implementation for an element in a fragment, such as a list item within a list box.

C#
/// <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;
    }
}

Remarks

A provider that implements IRawElementProviderFragmentRoot should return itself.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also