0

Say that I have a CompositeCommand with a lot of DelegateCommands registered.

If one of the child DelegateCommands fires up RaiseCanExecuteChanged, this will result in firing the event CompositeCommand.CanExecuteChanged, raising this same event in the other children, or it will only affect the active DelegateCommand?

Carlos Melo
  • 3,052
  • 3
  • 37
  • 45

1 Answers1

2

Just figured this out. By analyzing the internals of Prism, I noticed that the CompositeCommand registers itself in its children's CanExecuteChanged event. Thus, everytime a registered command raises the CanExecuteChanged handler, the composite command does the same in itself and in all of its children.

Carlos Melo
  • 3,052
  • 3
  • 37
  • 45