views:

10

answers:

2

hi, i have a prism silverlight app that for communication between views i used eventAgregator. my problem is when i use eventAgregator between two view in single module that work. but when i use that between two views in two moduls that dont work. what is problem.

A: 

hi, i use eventAgregator subscriber in ctor of my controller class. when i put it in run methods of contoller it work. stil i dont now why it dont work in ctor.

MMBPro
A: 

Hi,

Without more information or detailed code samples, my first guess is that this issue is related to the subscriber being GCed.

This blog post describes a possible scenario where this could happen. If this is the case, just make sure the subscriber is not GCed by keeping a reference to it, or passing the keepSubscriberAlive=true parameter when subscribing to the event.

You should also make sure the EventAggregator instance you are getting in both modules is the same one. You can use GetHashCode for that.

I hope this helps.

Thanks, Damian

Damian Schenkelman

related questions