0

I want to add Shortcut keys like Ctrl+O to submenus. The code which i am using:

<Menu>
       <MenuItem Header="_File" InputGestureText="alt+f">
            <MenuItem Header="_Open" InputGestureText="Ctrl+O" />    
       </MenuItem> 
</Menu>

When I add InputGestureText="Ctrl+O" on Open Menu Item then it is not working. Instead of working it is showing(Ctrl+O) along with Open text in menu Item while running.

Can you please provide any solution.

user3817749
  • 99
  • 1
  • 11

1 Answers1

0

As per MSDN.

This property does not associate the input gesture with the menu item; it simply adds text to the menu item. The application must handle the user's input to carry out the action. For information on how to associate a command with a menu item, see Command.

Nitin Joshi
  • 1,638
  • 1
  • 14
  • 17