I am working on a WPF application in which I handled the mouse down event, which eventually pops up a MessageBox. But after the MessageBox appears in mouseDown, it eats up the corresponding MouseUp event of the control.
The script can be easily reproduced by simply handling the MouseDown and MouseUP event in the WPF window as: -
private void Window_MouseDown(object sender, MouseButtonEventArgs e) { MessageBox.show("Hello, Mouse down"); } private void Window_MouseUP(object sender, MouseButtonEventArgs e) { MessageBox.show("Hello, Mouse Up"); }
The MouseUp message is never displayed after the message appears in the MouseDown event.
Karan
source share