AutomationInteropProvider.AppendRuntimeId Field


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Contains a value that, when returned as the first element of the array passed by the UI Automation provider to GetRuntimeId, indicates that the ID is partial and should be appended to the ID provided by the base provider.

Namespace:   System.Windows.Automation.Provider
Assembly:  UIAutomationProvider (in UIAutomationProvider.dll)

public const int AppendRuntimeId

Field Value

Type: System.Int32

This field is typically used in the implementation of GetRuntimeId for elements in a fragment that are not directly hosted in a window.

The following example is an implementation of IRawElementProviderFragment.GetRuntimeId for a list item.

/// <summary>
/// Gets the runtime identifier of the UI Automation element.
/// </summary>
/// <remarks>
/// myID is a unique identifier for the item within this instance of the list.
/// </remarks>
public int[] GetRuntimeId()
    return new int[] { AutomationInteropProvider.AppendRuntimeId, myID };

.NET Framework
Available since 3.0
Return to top