I am trying for MVVM pattern basic level and got struck at ICommand CanExecute changed. I have XAML binding as follows:
You must have in your ICommand implementation some method like RiseCanExecuteChanged
that fires the event CanExecuteChanged
. Then every time that the selected item in the list changed, in your view model you execute the RaiseCanExecuteChanged
from the command you want. Any way I suggest you to use any generic command, like the RelayCommand
of GalaSoft MVVMLite library, or any implementation of DelegateCommand
.
Hope this helps...