void RefreshCommandCanExecuteChanged(object sender, EventArgs eventArgs) { if (IsRefreshing) { return; } if (Command != null) { SetValueCore(IsEnabledProperty, Command.CanExecute(CommandParameter)); } else { SetValueCore(IsEnabledProperty, true); } }
void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs) { IsEnabled = Command.CanExecute(CommandParameter); }