private void Save_CanExecute(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = ControlRoles.GetState(Model?.EditCommand) && Model?.Items.HasChanges == true; }
private void Add_CanExecute(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = ControlRoles.GetState(Model?.EditCommand); }
private void Delete_CanExecute(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = ControlRoles.GetState(Model?.EditCommand) && Model?.CurrentItem != null; }