MVVM/WPF: Button is not disabled although the CanExecute says return value is FALSE ??
- by msfanboy
Hello,
I have a detach and attach button with Command="..." bound to my ViewModel.
Although I have only 1 selected pupil but have NOT selected a subject the detach button is not disabled, the attach button is ???
public RelayCommand AttachdSubjecstCommand
{
get { return _attachSubjectsCommand ?? (_attachSubjectsCommand = new RelayCommand(() => AttachSubjects(), () => CanAttachSubjects)); }
}
public RelayCommand DetachSubjectsCommand
{
get { return _detachSubjectsCommand ?? (_detachSubjectsCommand = new RelayCommand(() => DetachSubjects(), () => CanDetachSubjects)); }
}