private void Button_Click(object sender, RoutedEventArgs e) { NewUserAccountViewModel newUserAccountViewModel = (NewUserAccountViewModel)DataContext; if (((Button)sender).Content.Equals("Proceed")) { newUserAccountViewModel.saveUserAccount(); } else if (((Button)sender).Content.Equals("Cancel")) { newUserAccountViewModel.cancelUserUpdate(); } }
private void Password_PasswordChanged(object sender, RoutedEventArgs e) { NewUserAccountViewModel newUserAccountViewModel = (NewUserAccountViewModel)DataContext; newUserAccountViewModel.Password = ((PasswordBox)sender).Password; }
private void TextBox_MouseDoubleClick(object sender, MouseButtonEventArgs e) { NewUserAccountViewModel newUserAccountViewModel = (NewUserAccountViewModel)DataContext; ((TextBox)sender).Text = newUserAccountViewModel.browsePhoto(); }
public DatabaseConnection(NewUserAccountViewModel newUserAccountViewModel) { this.newUserAccountViewModel = newUserAccountViewModel; createConnection(); }