xaml - Converting KeyBinding to MouseBinding in WPF -
i'm working datagrid.
i have following xaml:
<dg:datagrid lc:datagridpackage.querygrid="{binding mygrid}">     ...     <dg:datagrid.resources>         <lc:commandreference x:key="mycommand" command="{binding mycommandactionitem}" />     </dg:datagrid.resources>      <dg:datagrid.inputbindings>         <keybinding modifiers="control" key="d" command="{staticresource mycommand}" /> it works fine. click on row in datagrid, press ctrl+d , command executes (in case, refreshing row).
however, if change keybinding mousebinding:
<mousebinding mouseaction="leftdoubleclick" command="{staticresource mycommand}">  i error "a 'binding' cannot set on the 'command' property of type 'mousebinding'. 'binding' can set on dependencyproperty of dependencyobject".
what doing wrong?
try this:
<mousebinding mouseaction="leftdoubleclick" command="{staticresource mycommand}" /> you can't use binding markup extension on command property. error says, command not dependencyproperty.