1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| public RelayCommand LoginCommand { get; set; }
private string password;
public ConnexionViewModel()
{
InscriptionViewCommand = new RelayCommand(executeActionInscription);
LoginCommand = new RelayCommand(executeActionLogin);
}
public string Password
{
get { return this.password; }
set
{
// Implement with property changed handling for INotifyPropertyChanged
if (!string.Equals(this.password, value))
{
this.password = value;
this.RaisePropertyChanged(); // Method to raise the PropertyChanged event in your BaseViewModel class...
}
}
}
public void executeActionLogin(object parameters)
{
var passwordBox = parameter as PasswordBox;
this.password = passwordBox.Password;
Page.Frame.Navigate(typeof(IndexView));
Debug.WriteLine(this.email);
Debug.WriteLine(this.password);
} |
Partager