MVVM and password -


I am using MVVM and the model's password field. What have I found on the web, when you have to implement a custom class for binding and to use the password box to handle this password, I think this is an overhead, do you have me with a password-linked AD / Can a better way to use edit user control?

The easy way, but not MVVM:

Xaml < / P> changed password password = "password box fileing changed"

Xaml .cs

  Private Zero passwordbox_ PasswordChanged (object Sender, RoutedEventArgs e) {If (viewModel! = Null & Sender password box is) ViewModel.DatabasePassword = ((PasswordBox Sender)). password; } Private Zero Load () View // ViewModel.DatabasePasswordModel. Read data (); Password box Password = ViewModel. Database password; }  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -