public void TaBortAlumnKonto(object commandParameter) //Klar { Alumn.TaBort(); GLOBALSWPF.AktuellAlumn = null; MainWindow loginWindow = new MainWindow(); foreach (var window in Application.Current.Windows) { if (window is MainAlumnWindow x) { x.Close(); } } loginWindow.Show(); }