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
Here's a little workaround for Prism (tested with Prism.Core 7.1.0.431):
public class RelayCommand : DelegateCommand
{
public RelayCommand(Action executeMethode) : base(executeMethode)
{
}
public RelayCommand(Action executeMethode, Func canExecuteMethode) : base(executeMethode, canExecuteMethode)
{
}
public override event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySuggested -= value; }
}
}