private void button_menu_Click(object sender, RoutedEventArgs e) { if (windowUpdate == null) { windows8Menu = new Windows8RightMenu.MainWindow(); windows8Menu.Closed += (obj_sender, args) => windows8Menu = null; windows8Menu.Owner = this; windows8Menu.Show(); } windows8Menu.Focus(); }