我添加了以下代码以在命令绑定中添加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);