다음을 통해 공유


MouseGesture.MouseAction 속성

정의

이 제스처와 연결된 MouseAction을 가져오거나 설정합니다.

public:
 property System::Windows::Input::MouseAction MouseAction { System::Windows::Input::MouseAction get(); void set(System::Windows::Input::MouseAction value); };
public System.Windows.Input.MouseAction MouseAction { get; set; }
member this.MouseAction : System.Windows.Input.MouseAction with get, set
Public Property MouseAction As MouseAction

속성 값

이 제스처와 연결된 마우스 동작입니다. 기본값은 None입니다.

예제

만들려면 다음 예제에서는 MouseGesture 와 연결을 RoutedCommand 를 통해를 MouseBinding입니다.

MouseGesture OpenCmdMouseGesture = new MouseGesture();
OpenCmdMouseGesture.MouseAction = MouseAction.WheelClick;
OpenCmdMouseGesture.Modifiers = ModifierKeys.Control;

MouseBinding OpenCmdMouseBinding = new MouseBinding();
OpenCmdMouseBinding.Gesture = OpenCmdMouseGesture;
OpenCmdMouseBinding.Command = ApplicationCommands.Open;

this.InputBindings.Add(OpenCmdMouseBinding);
Dim OpenCmdMouseGesture As New MouseGesture()
OpenCmdMouseGesture.MouseAction = MouseAction.WheelClick
OpenCmdMouseGesture.Modifiers = ModifierKeys.Control

Dim OpenCmdMouseBinding As New MouseBinding()
OpenCmdMouseBinding.Gesture = OpenCmdMouseGesture
OpenCmdMouseBinding.Command = ApplicationCommands.Open

Me.InputBindings.Add(OpenCmdMouseBinding)

설명

와 달리를 KeyGesture, MouseAction 와 연결할 필요가 없습니다 ModifierKeys 유효한 되려면 MouseGesture합니다.

적용 대상

추가 정보