如何绑定鼠标操作?

时间:2011-09-12 05:23:08

标签: c#-3.0 mouse

我添加了以下代码以在命令绑定中添加Mouse手势,但看起来键盘快捷方式正常但鼠标快捷方式无效:

      gestures = new InputGestureCollection
      {
        new KeyGesture(Key.Enter, ModifierKeys.Control), new MouseGesture(MouseAction.MiddleClick, ModifierKeys.Control)
      };
      zoomChartToFitCommand = new RoutedUICommand("Zoom To Fit", "zoomChartToFit", typeof(ZoomCommands), gestures);

0 个答案:

没有答案