private void Button_Click_1(object sender, RoutedEventArgs e) { var result = MessageBox.Show(@"Do you want to return to the Main Menu?", "Close Game", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { myMain = new MainWindow(); myMain.Show(); Arith.Hide(); } }