private void DepthProfileViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e) { // RaiseCanExecuteChangedはここにまとめる. switch (e.PropertyName) { case nameof(ExportCsvDestination): ExportCsvCommand.RaiseCanExecuteChanged(); break; case nameof(CurrentFittingProfile): AddReferenceSpectrumCommand.RaiseCanExecuteChanged(); RemoveProfileCommand.RaiseCanExecuteChanged(); break; case nameof(FitCommandExecuting): FitSpectrumCommand.RaiseCanExecuteChanged(); break; } }
// DepthProfileViewModelからのコピペ. private void FittingProfiles_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { FitSpectrumCommand.RaiseCanExecuteChanged(); }