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

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -