I have an application that contains Menu and sub menus. I have attached Appliocation Commands to some of the sub menu items such as Cut, Copy and Paste.
I also have some other menu items that do not have application commands.
How could I add a custom command binding to those sub menu items?
I have gone through this article but unable to attach event to my sub menu items.
I have an application that contains Menu and sub menus. I have attached Appliocation
Share
I use a static class that I place after the Window1 class (or whatever the window class happens to be named) where I create instances of the RoutedUICommand class:
Add a namespace in the window markup, using the namespace that the Window1 class is in:
Now I can create bindings for the commands just as for the application commands:
And use the bindings in a menu for example: