AutomationInteropProvider.AppendRuntimeId Campo

Definição

Contém um valor que, quando devolvido como o primeiro elemento do array passado pelo fornecedor Automatização da Interface de Utilizador para GetRuntimeId(), indica que o ID é parcial e deve ser acrescentado ao ID fornecido pelo fornecedor base.

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

Valor de Campo

Value = 3

Exemplos

O exemplo seguinte é uma implementação de IRawElementProviderFragment.GetRuntimeId para um item de lista.

/// <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

Observações

Este campo é tipicamente usado na implementação de GetRuntimeId para elementos num fragmento que não estão diretamente alojados numa janela.

Aplica-se a