private void InvalidateCommands() { foreach (var item in CommandItems.OfType <DelegateCommandItem>()) { item.Command.RaiseCanExecuteChanged(); } }
private void OnEditorPropertyChanged(object sender, PropertyChangedEventArgs eventArgs) { // Invalidate all DelegateCommands. CommandItems.OfType <DelegateCommandItem>() .Select(item => item.Command) .ForEach(command => command.RaiseCanExecuteChanged()); UpdateSyntaxHighlightingItem(); }
private void UpdateCommands() { if (_suppressUpdateCommandItems) { return; } // Invalidate all DelegateCommands. CommandItems.OfType <DelegateCommandItem>() .Select(item => item.Command) .ForEach(command => command.RaiseCanExecuteChanged()); }