marc wellman
marc wellman

Reputation: 5886

What comes first - Command or EventHandler?

In context of Microsoft's MVVM pattern and its Commanding/Event Handling aspects consider I am doing both binding a Command to a Control (say a Button) and subscribing to the control's Click event.

Is there any general rule what action takes place first - the processing of the code associated with the command or the one associated with the corresponding event handler?

Upvotes: 9

Views: 1985

Answers (1)

Jone Polvora
Jone Polvora

Reputation: 2338

EventHandlers are triggered before the bound ICommand.

Upvotes: 7

Related Questions