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:

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
Post a Comment