private void RegisterUser_Click(object sender, RoutedEventArgs e) { RegisterScreen registerScreen = new RegisterScreen();//открывает новый экран registerScreen.Owner = this; registerScreen.Show(); }
private void OpenRegisterPage() { RegisterScreen registerView = new RegisterScreen(); registerView.Show(); var loginScreen = (Application.Current.MainWindow as LoginScreen); if (loginScreen != null) { loginScreen.Close(); } }