AutomationProperties.SetAutomationId(DependencyObject, String) 方法

定義

為指定的 DependencyObject 設定 AutomationId 附加屬性。

public:
 static void SetAutomationId(System::Windows::DependencyObject ^ element, System::String ^ value);
public static void SetAutomationId (System.Windows.DependencyObject element, string value);
static member SetAutomationId : System.Windows.DependencyObject * string -> unit
Public Shared Sub SetAutomationId (element As DependencyObject, value As String)

參數

element
DependencyObject

要設定屬性的 DependencyObject

value
String

要設定的消費者介面自動化識別碼值。

適用於

另請參閱