Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I need to use a Usercontrol in a view of an MVVM project.
The Usercontrol is not written with MVVM architecture.
The user control could not be re written in MVVM style.
In MVVM project, I need to subscribe an event fired from the user control.
How is it possible?

Kindly provide a solution with an example.

Regards,
Hashim
Posted
Updated 3-Dec-14 0:14am
v2

1 solution

The solution lies in the
System.Windows.Interactivity namespace.

It allows you to use commands when triggered by events.

A detailled explanation can be found here:
http://blog.magnusmontin.net/2013/06/30/handling-events-in-an-mvvm-wpf-application/[^]

Just look for "EventTriggers".
 
Share this answer
 
v3

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