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.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -