Working with DelegateCommand's CanExecute action
问题 I've a ViewModel class like this in a Prism / WPF project. public class ContentViewModel : ViewModelBase, IContentViewModel { public ContentViewModel(IPersonService personService) { Person = personService.GetPerson(); SaveCommand = new DelegateCommand(Save, CanSave); } public Person Person { get; set; } public DelegateCommand SaveCommand { get; set; } private void Save() { // Save actions here... } private bool CanSave() { return Person.Error == null; } } The person type used in the above