AutomationElement.RuntimeIdProperty 欄位

定義

識別包含元素之執行階段識別項的屬性。Identifies the property that contains the runtime identifier of the element.

public: static initonly System::Windows::Automation::AutomationProperty ^ RuntimeIdProperty;
public static readonly System.Windows.Automation.AutomationProperty RuntimeIdProperty;
 staticval mutable RuntimeIdProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly RuntimeIdProperty As AutomationProperty 

欄位值

AutomationProperty

範例

下列範例會抓取屬性的目前值。The following example retrieves the current value of the property.

int[] runtimeIdentifier = (int[])
    autoElement.GetCurrentPropertyValue(AutomationElement.RuntimeIdProperty);
Dim runtimeIdentifier As Integer() = _
    CType(autoElement.GetCurrentPropertyValue(AutomationElement.RuntimeIdProperty), Integer())

備註

消費者介面自動化用戶端應用程式會使用此識別碼。This identifier is used by UI Automation client applications. 消費者介面自動化提供者應該在中使用對等的識別碼 AutomationElementIdentifiersUI Automation providers should use the equivalent identifier in AutomationElementIdentifiers.

執行時間識別碼屬性指定的識別碼 AutomationElement 在桌面上是唯一的。The runtime ID property specifies an ID for an AutomationElement that is unique on the desktop.

屬性的傳回值是型別的陣列 Int32The return value of the property is an array of type Int32. 沒有任何預設值。There is no default value.

適用於

另請參閱