AutomationProperties.SetAutomationId(DependencyObject, String) 方法

定义

设置指定 DependencyObjectAutomationId 附加属性。

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

要设置的UI 自动化标识符值。

适用于

另请参阅