KeyBinding.Gesture 속성

정의

KeyBinding과 연결된 제스처를 가져오거나 설정합니다.

public:
 virtual property System::Windows::Input::InputGesture ^ Gesture { System::Windows::Input::InputGesture ^ get(); void set(System::Windows::Input::InputGesture ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Input.KeyGestureConverter))]
public override System.Windows.Input.InputGesture Gesture { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Input.KeyGestureConverter))>]
member this.Gesture : System.Windows.Input.InputGesture with get, set
Public Overrides Property Gesture As InputGesture

속성 값

키 시퀀스입니다. 기본값은 null입니다.

특성

예외

gesture 값이 KeyGesture로 설정되지 않는 경우

예제

다음 예제에서는 바인딩하는 방법을 보여 줍니다는 KeyGestureRoutedCommand 를 사용 하 여를 KeyBinding (태그 및 코드 예제에서는 서로 다른 키를 지정 합니다. 그렇지 않을 경우 해당).

<Window.InputBindings>
  <KeyBinding Command="ApplicationCommands.Open"
              Gesture="CTRL+R" />
</Window.InputBindings>
KeyGesture CloseCmdKeyGesture = new KeyGesture(
    Key.L, ModifierKeys.Alt);

KeyBinding CloseKeyBinding = new KeyBinding(
    ApplicationCommands.Close, CloseCmdKeyGesture);

this.InputBindings.Add(CloseKeyBinding);
Dim CloseCmdKeyGesture As New KeyGesture(Key.L, ModifierKeys.Alt)

Dim CloseKeyBinding As New KeyBinding(ApplicationCommands.Close, CloseCmdKeyGesture)

Me.InputBindings.Add(CloseKeyBinding)

설명

기능 키와 숫자 키패드의 키를 제외 하 고는 KeyGesture 포함 해야 합니다는 Key 와 하나 이상의 ModifierKeys합니다.

적용 대상

추가 정보