KeyGesture.Key 屬性

定義

取得與這個 KeyGesture 關聯的按鍵。Gets the key associated with this KeyGesture.

public:
 property System::Windows::Input::Key Key { System::Windows::Input::Key get(); };
public System.Windows.Input.Key Key { get; }
member this.Key : System.Windows.Input.Key
Public ReadOnly Property Key As Key

屬性值

Key

與筆勢相關聯的按鍵。The key associated with the gesture. 預設值為 NoneThe default value is None.

備註

在大部分情況下, KeyGesture必須與一或多個ModifierKeys相關聯。In most cases, a KeyGesture must be associated with one or more ModifierKeys. 此規則的例外狀況是函式索引鍵和數位鍵臺上鍵, 其本身可能是KeyGesture有效的。The exceptions to this rule are the function keys and the numeric keypad keys, which can be a valid KeyGesture by themselves.

適用於

另請參閱