c# - Mouse Double Click DataGrid row -
i have datagrid style template wish add double click behaviour to. binding should correct cannot seem xaml compiling / working.
all objects added idictionary must have key attribute or other type of key associated them.
what wrong code below?
<style targettype="{x:type datagridrow}"> <eventsetter event="mousedoubleclick" handler="{binding connect}"/>
update per viktor's comment (gives exact same error):
<style x:key="datagridrowstyle" targettype="{x:type datagridrow}"> <eventsetter event="previewmousedoubleclick" handler="{binding connect}"/>
one can use datagrid inputbindings achieve goal:
<datagrid.inputbindings> <mousebinding mouseaction="leftdoubleclick" command="{binding somecommand}" /> </datagrid.inputbindings>
Comments
Post a Comment