I am coding a simple login UserControl with two TextBoxes (Username and Password) and a Login button. I want the Login button to be enabled only when the username and password f
Code for RaiseCanExecuteChanged:
private void RaiseCanExecuteChanged() { DelegateCommand command = LoginCommand as DelegateCommand; command.RaiseCanExecuteChanged(); } public const string UsernameProperty = "Username"; private String _username; public String Username { get { return _username; } set { _username = value; this.NotifyPropertyChanged(UsernameProperty); RaiseCanExecuteChanged(); } }