tags:

views:

12

answers:

1

i can bind Ctrl+C or Ctrl+LeftClick. but can i bind to mouse/scroll wheel actions? i am trying to do something like increase/decrease font size like in the browser. so ctrl+mwheelup = increase font size

A: 

In constructor

    PreviewMouseWheel += Zoom_MouseWheel;

And then

    private void Zoom_MouseWheel(object sender, MouseWheelEventArgs e)
    {
        bool handle = (Keyboard.Modifiers & ModifierKeys.Control) > 0;
        if (!handle)
            return;

        zoom();
    }
lukas