Επεξεργασία

Κοινή χρήση μέσω


AutomationInteropProvider.AppendRuntimeId Field

Definition

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.

public: int AppendRuntimeId = 3;
public const int AppendRuntimeId = 3;
val mutable AppendRuntimeId : int
Public Const AppendRuntimeId As Integer  = 3

Field Value

Value = 3

Examples

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 };
}
''' <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 Function GetRuntimeId() As Integer() _
    Implements IRawElementProviderFragment.GetRuntimeId

    Return New Integer() {AutomationInteropProvider.AppendRuntimeId, myID}

End Function 'GetRuntimeId

Remarks

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

Applies to