private void InvalidateCommands()
 {
     foreach (var item in CommandItems.OfType <DelegateCommandItem>())
     {
         item.Command.RaiseCanExecuteChanged();
     }
 }
Beispiel #2
0
        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());
        }