private void beNotifyIcon_TrayMouseDoubleClick(object sender, RoutedEventArgs e) {
this.Visibility = Visibility.Visible;
if (this.WindowState == WindowState.Minimized) {
User32.ShowWindow(Handle, User32.ShowWindowCommands.Restore);
}
this.Activate();
this.Topmost = true; // important
this.Topmost = false; // important
this.Focus(); // important
}