Showing posts from August, 2010

WPF Commands

Q. What happens if we define both the Command for a button and also provide handler for its click event?
A. The click event's handler fires first, and then the command.
Q. Can we assign add a command twice to the CommandBindings collection with different execute event handler?
A. Through testing it looks only one execute handler is fired. The first binding which is added to the collection gets invoked.
Q. Can we do something additional when the built-in commands are fired? For example we want to do something more when a copy command is invoked. Adding a new binding for Application.Copy does not work. (refer previous question) Or if we can't extend can override the Application.Cut behavior?