I created an event in 1 viewmodel and want another to subscribe to it, how do I find it? WPF MVVM -


as title states... how can find different viewmodel....

my first guess search usercontrol it's bying used , go through that... seems lot of work must easy find....

you can make use of messenger class.

when want execute method present in 1 viewmodel in other viewmodel.. can send message viewmodel(which holds event want execute) viewmodel(from want acess) , can execute event.

register message in constructor of class in event declared. send message viewmodel(in want access) @ point want use event.


Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -