private void Button_Click(object sender, RoutedEventArgs e) { var w = Application.Current.Windows[0]; w.Hide(); AdmWindow win = new AdmWindow(); win.ShowDialog(); }