AutomationProperties.SetName(DependencyObject, String) 方法

定义

设置 Name 附加属性。

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

参数

element
DependencyObject

要在其上设置属性的 DependencyObject

value
String

要设置的名称值。

适用于

另请参阅