c# - MVVMLIGHT: MouseDoubleClick does not work -


i have listbox eventtrigger mousedoubleclick.

this does not work: eventname="mousedoubleclick"

this works: eventname="mouseleftbuttonup"

here's view

 <listbox x:name="mylistbox" />         <i:interaction.triggers>         <i:eventtrigger eventname="mousedoubleclick">         <command:eventtocommand command="{binding userselectioncommand}"                                  commandparameter="{binding  selecteditem, elementname=mylistbox}"                                                  />          </i:eventtrigger>         </i:interaction.triggers> 

in viewmodel

public relaycommand<string> userselectioncommand {get; private set;}  userselectioncommand = new relaycommand<string>(showselecteditem);  private void showselecteditem(string selecteddata) { .. } 

the closing listbox should after interaction.triggers, not before.

<listbox>   <interaction.triggers>  .. <interaction.triggers> </listbox> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -