/// <summary> /// Adds a handler for the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.Mouse.PreviewMouseWheel"/> /// attached event to the specified element. /// </summary> /// <param name="element">The element to which to add the handler.</param> /// <param name="handler">The handler to add to the specified element.</param> public static void AddPreviewMouseWheelHandler(DependencyObject element, UpfMouseWheelEventHandler handler) { Contract.Require(element, nameof(element)); Contract.Require(handler, nameof(handler)); IInputElementHelper.AddHandler(element, PreviewMouseWheelEvent, handler); }
/// <summary> /// Removes a handler for the MouseWheel attached event from the specified element. /// </summary> /// <param name="element">The element to which to Remove the handler.</param> /// <param name="handler">The handler to remove from the specified element.</param> public static void RemoveMouseWheelHandler(DependencyObject element, UpfMouseWheelEventHandler handler) { Contract.Require(element, "element"); Contract.Require(handler, "handler"); IInputElementHelper.RemoveHandler(element, MouseWheelEvent, handler); }