开发者

How Can I Add Event Aggregation To An Existing Silverlight App?

I have an existi开发者_开发知识库ng Silverlight application where Page.xaml has some buttons on it that load user controls into a TransitioningContentControl content host. Each of these user controls is bound to a viewmodel. Sometimes when changes are made to one user control, data in others would need to be updated. I have been looking at using the event aggregator in Prism but don't really want to have to convert everything to a shell, modules etc. Is there any way for me to add event aggregation without going to Prism?


You can use the EventAggregator from Prism on its own - no changes to your application are required to accommodate it - or you could use an alternative such as Messenger from the MVVM Light Toolkit. Links to further alternatives and discussion can be found on Jeremy D. Miller's blog.


You can find one example here at Event Aggregation QuickStart

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜