AutomationProperties.SetAccessKey(DependencyObject, String) 方法

定义

设置指定 DependencyObjectAutomationProperties.AccessKey 附加属性的值。

public:
 static void SetAccessKey(DependencyObject ^ element, Platform::String ^ value);
 static void SetAccessKey(DependencyObject const& element, winrt::hstring const& value);
public static void SetAccessKey(DependencyObject element, string value);
function setAccessKey(element, value)
Public Shared Sub SetAccessKey (element As DependencyObject, value As String)

参数

element
DependencyObject

要为其设置 属性的 DependencyObject

value
String

Platform::String

winrt::hstring

要设置的访问密钥值。

适用于

另请参阅