共用方式為


AutomationProperties.SetAccessKey(DependencyObject, String) 方法

定義

為指定的DependencyObject設定AutomationProperties.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

要設定的存取金鑰值。

適用於