private void Vm_HasLoggedIn(object sender, EventArgs e) { //EventHandler NotesWindow NW = new NotesWindow(); NW.Show(); this.Close(); }
public LoginWindow(NotesWindow nw) { InitializeComponent(); NotesWindow = nw; viewModel = this.Resources["login"] as LoginVM; //LoginVM vm = new LoginVM(); containerGrid.DataContext = viewModel; viewModel.HasLoginedIn += Vm_HasLoggedIn; }