In This Article

MouseWheelBinding Class

Binds a MouseWheelGesture to a RoutedCommand (or another ICommand implementation).

public class MouseWheelBinding : InputBinding
Inheritance:
object InputBinding object

Remarks

A MouseWheelBinding associates a MouseWheelGesture with an ICommand implementation. RoutedCommand is the primary implementation of the ICommand interface for the WPF commanding system. In general, when the MouseWheelGesture is executed, the command is invoked, although the command behavior is further influenced by command-specific factors such as the CanExecute value. For more information on commanding, see the Commanding Overview (http://msdn.microsoft.com/en-us/library/ms752308.aspx).

Constructors

MouseWheelBinding()

Initializes a new instance of the MouseWheelBinding class.

public MouseWheelBinding()

MouseWheelBinding(ICommand, MouseWheelGesture)

Initializes a new instance of the MouseWheelBinding class.

public MouseWheelBinding(ICommand command, MouseWheelGesture gesture)
Parameter Type Description
command ICommand

The command.

gesture MouseWheelGesture

The gesture.

Properties

Gesture

Gets or sets the MouseWheelGesture associated with this input binding.

[TypeConverter(typeof(MouseWheelGestureConverter))]
[ValueSerializer(typeof(MouseWheelGestureValueSerializer))]
public override InputGesture Gesture { get; set; }

Property Value

InputGesture:

The associated gesture. The default is null.

MouseWheelAction

Gets or sets the MouseWheelAction associated with this MouseWheelBinding.

public MouseWheelAction MouseWheelAction { get; set; }

Property Value

MouseWheelAction:

The mouse wheel action.