I have got a question about event and bound command.
What happens if I bound a command to my button and also handle the click event in my code behind ?
I mean, I have already tried and everything is ok but I was wondering whether this affects the efficiency or something else ?
Is it a good practice ?
In my case the code behind is just to close a window after it has executed a command.
thank you everybody
This is definitely not a best practice, since they are two different ways of achieving the same outcome. What you may want to do investigate as a solution, is passing a callback as the parameter (or part of the parameter object) of your command and have the command call the method/callback.
If you must, you can also specify, with a flag, whether the callback should be called before of after the command’s code block completes.