tags:

views:

132

answers:

1

I just created a menu with Command="ApplicationCommands.Copy" and I thought I had to handle the Executed event of the binding, and add a binding but I just don't need to.

Now I'm confused!

Where is the implementation of this command? How can it automatically copy a text selected in any of the textboxes I have in my window?

thanks!

+2  A: 

How did you verify that you didn't need to handle the Executed event of the command - was it with the built-in TextBox? If so, the reason that you don't have to handle it is because the TextBox handles that command already (since it is built-in). The same is true for the other edit commands - Cut, Paste, Undo, Redo (and probably others as well).

If you were using your own custom command, then you would need to handle its Executed event, as you stated in your question.

Andy