共用方式為


AutomationProperties.SetAcceleratorKey(DependencyObject, String) 方法

定義

設定指定DependencyObjectAutomationProperties.AcceleratorKey附加屬性的值。

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

參數

element
DependencyObject

要為其設定屬性的 DependencyObject

value
String

Platform::String

winrt::hstring

要設定的快速鍵值。

適用於