I got the following code from Josh Smith's MVVM tutorial.
Can anyone provide a quick explanation of what this code actually does?
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySuggested -= value; }
}
I can't understand two things:
- what does the
CanExecuteChangedevent do? - what does the
CommandManager.RequerySuggesteddo?
The above code is from the RelayCommand Class from here.