How can I handle the mouse wheel click event in WPF? How can I handle the mouse wheel click event in WPF? wpf wpf

How can I handle the mouse wheel click event in WPF?


Mousewheel is actually the MiddleButton, So the condition for Wheel click on a MouseDown event is ChangedButton == Middle && ButtonState == Pressed


An even easier solution

if (e.MiddleButton) { MessageBox.Show("Middle button clicked"); }