Esempio n. 1
0
 private void DataContextChangedEventHandler(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (DataContext != null && DataContext is SignUpViewModel)
     {
         SignUpViewModel viewModel = DataContext as SignUpViewModel;
         viewModel.ViewContext = this;
     }
 }
Esempio n. 2
0
 private void RetypedPasswordBox_PasswordChanged(object sender, RoutedEventArgs e)
 {
     if (DataContext != null &&
         DataContext is SignUpViewModel &&
         sender is PasswordBox)
     {
         SignUpViewModel viewModel   = DataContext as SignUpViewModel;
         PasswordBox     passwordbox = sender as PasswordBox;
         viewModel.RetypedPassword = passwordbox.SecurePassword;
     }
 }