/// <summary> /// Handles mouse wheel events. /// </summary> /// <param name="view">The plot view.</param> /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param> /// <returns><c>true</c> if the event was handled.</returns> public virtual bool HandleMouseWheel(IView view, OxyMouseWheelEventArgs args) { lock (this.GetSyncRoot(view)) { var command = this.GetCommand(new OxyMouseWheelGesture(args.ModifierKeys)); return(this.HandleCommand(command, view, args)); } }
/// <summary> /// Zooms the view by the mouse wheel delta in the specified <see cref="OxyKeyEventArgs" />. /// </summary> /// <param name="view">The view.</param> /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param> /// <param name="factor">The zoom speed factor. Default value is 1.</param> private static void HandleZoomByWheel(IPlotView view, OxyMouseWheelEventArgs args, double factor = 1) { var m = new ZoomStepManipulator(view) { Step = args.Delta * 0.001 * factor, FineControl = args.IsControlDown }; m.Started(args); }
/// <summary> /// Handles mouse wheel events. /// </summary> /// <param name="view">The plot view.</param> /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param> /// <returns><c>true</c> if the event was handled.</returns> public virtual bool HandleMouseWheel(IView view, OxyMouseWheelEventArgs args) { lock (this.GetSyncRoot(view)) { var command = this.GetCommand(new OxyMouseWheelGesture(args.ModifierKeys)); return this.HandleCommand(command, view, args); } }