Shared data between regions

Topics: Prism v2 - Silverlight 2
Apr 9, 2009 at 7:40 PM
Say you have 2 regions and 2 modules. If you load module 1 into region 1 and module 2 into region 2. Is there a way that a datagrid in region 1 and a dataform in region 2 can share the same data collection returned from a WCF service?
Apr 10, 2009 at 4:40 AM

There are a couple of ways I can think of doing this.

  1. Use the IEventAggregator to publish the data collection in your WCF callback method and then have the PresentationModels/ViewModels in each of the modules subscribe to the event and update your views.
  2. You could probably also use the IUnityContainer to store the class you're calling the WCF service from and then get a reference to it in each of the modules and hook into an event you'd raise when the WCF call is complete.

Let me know if this helps or if it's too high level for you.


Apr 10, 2009 at 4:50 PM
Yes, this helps. Thank you.