private void Window_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
App.Current.MainWindow.Visibility = System.Windows.Visibility.Visible;
Close();
}
A click/click event is also send to any window behind…
Even this bugs…
private void Window_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
App.Current.MainWindow.Visibility = System.Windows.Visibility.Visible;
System.Threading.Thread.Sleep(500);
Close();
}
MouseDoubleClick is a direct routed event, and as such even setting
e.Handled = truewill not affect subsequent events up the tree. The suggested method for handling a double-click is to handleMouseLeftButtonDown, and check forClickCount == 2. You can then sete.Handled = true, which should prevent the event from bubbling.