private void EditStudent_Click(object sender, RoutedEventArgs e) { AddStudentWindow w = new AddStudentWindow(CurrentWindow.EditStudent); w.ShowDialog(); }