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
Starting with Prism6 the DelegateCommand
can "observe" your propertys. Means everytime your property is changing the CanExecute-Method is called. The good thing is you get rid of RaiseCanExecuteChanged
in the Propertysetter. You can also chain-call that method if you want to observe more properties:
public LoginViewModel()
{
this.LoginCommand =
new DelegateCommand
Furthermore if you just want your DelegateCommand be called depending on the state of a boolean property you can use .ObservesCanExecute(()=> BoolProp)
public LoginViewModel()
{
this.LoginCommand =
new DelegateCommand
You dont need this.CanLoginExecute
anymore.