Does WPF have mouse wheel scrolling up and down event
For event related to mouse wheel, there is only one option
No, there are others.
There is also the PreviewMouseWheel
(which functions just like the MouseWheel
event but is operates at a different point in the keyboard and mouse handling.).
The Preview also has a Delta
property which gives the direction of the wheel spin.
Example
private void PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
if (e.Delta > 0)
DoActionUp();
else if (e.Delta < 0)
DoActionDown();
}
No, there is just one event. When you look at the MouseWheelEventArgs class there is a property Delta. Delta is positive when the wheel is rotated away from the user and negative when the wheel is rotated toward the user.