共用方式為


AutomationProperties.GetAutomationId(DependencyObject) 方法

定義

取得指定DependencyObjectAutomationProperties.AutomationId附加屬性的值。

public:
 static Platform::String ^ GetAutomationId(DependencyObject ^ element);
 static winrt::hstring GetAutomationId(DependencyObject const& element);
public static string GetAutomationId(DependencyObject element);
function getAutomationId(element)
Public Shared Function GetAutomationId (element As DependencyObject) As String

參數

element
DependencyObject

要檢查的 DependencyObject

傳回

String

Platform::String

winrt::hstring

指定專案的 UI 自動化識別碼。

適用於