开发者

dont work eventAggregator in silverlight between two module

开发者 https://www.devze.com 2023-01-05 05:32 出处:网络
i have a prism silverlight app that for communication between views i used eventAgregator. my problem is when i use eventAgregator between two view开发者_如何学JAVA in single module that work. but whe

i have a prism silverlight app that for communication between views i used eventAgregator. my problem is when i use eventAgregator between two view开发者_如何学JAVA in single module that work. but when i use that between two views in two moduls that dont work. what is problem.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消