The Delta Mousewheel value is always 120

I am creating an application in WPF that uses a mouse wheel to zoom in / out. The amount of scaling depends on the amount of rotation of the mouse wheel.

The problem is that the Delta value is always 120, as explained in MSDN. Thus, even if I turn the wheel 1 mark or 5 notches, there will always be 120. Do you know a way around this?

+5
source share
1 answer

You should be able to handle the PreviewMouseWheel event . The delta for each event will be +/- 120, but you will get one event for each "mark" of the wheel.

+9

All Articles