c# - Command Inputbindings work but Shortcut does not show in MenuItem -


question:

i'm using josh smith's implementation of commands mvvm using routed commands. have menuitem binded command.

the input bindings defined in parent window. when run program, can use keyboard shortcut, menuitem not show control+o next menuitem header.

pics:

where ctrl+o?

code:

command bindings:

 <window.commandbindings>     <cmd:commandsinkbinding command="vm:mainvm.opendialogcommand" /> </window.commandbindings>  <window.inputbindings>     <keybinding command="vm:mainvm.opendialogcommand" key="o" modifiers="ctrl"/> </window.inputbindings> 

menu item:

<menuitem header="open" command="vm:mainvm.opendialogcommand" /> 

note: menuitem styled, removing style not make difference.

try this

<menuitem header="open" command="vm:mainvm.opendialogcommand"         inputgesturetext="ctrl+o" /> 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -