Click here to Skip to main content
15,945,939 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,

First attempt to wpf app :-)

I am developing wpf application where I am using MVVM pattern.
Now I have event nodeselected and on that I am doing some operation.
The eventargs of this event give me the node which I have selected.

Now I want to move this selected event handling code to viewmodel and
I want the eventargs also in command.

Please suggest the best way to do it.

Thanks & Regards
Sne
Posted

1 solution

Hi Try this EventToCommandBehavior

XML
<i:interaction.behaviors >
<vm:eventtocommandbehavior command="{Binding DataGridError}" event="XlationError" passarguments="True" />
</i:interaction.behaviors>
 
Share this answer
 
v3
Comments
snehalgb 16-May-14 6:22am    
This is for silverlight ;(
hari111r 19-May-14 8:30am    
No you can use this in WPF i used this in WPF
udaybhaskars 31-May-14 7:33am    
Hi Snehalgb,

As hari said you can use this in wpf
snehalgb 14-Jul-14 6:34am    
yes but for this I have to use interactivity dll and ship it... any other approach for this can u suggest... for now i m doing same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900