Load Modules into Contentpane based on saved Layout

Topics: Prism v4 - WPF 4
Jul 16, 2011 at 2:45 PM
Edited Jul 16, 2011 at 3:37 PM

I am loading all the modules in bootstrapper.

loading viewer in the contentpane is happening inside the module through eventAggregator(modules subscribing event from shell) based on the menu click.

Multiple viewers opened based on the user selection

 

Now i have new scenario

1. At the time of closing application saving all open viewers and it is stored in database

2. While opening application i want to restore open viewers. 

Multiple viewers will be retrieved so i feel that eventaggregator cannot be used because of asynshronous mode(No guarantee that all viewers will be loaded).

Please provide some input on this.

Developer
Jul 18, 2011 at 12:59 PM

Hi,

Based on my understanding of your scenario, if using events with the Event Aggregator isn't enough to satisfy your communication requirements, you could have a shared service responsible for saving and retrieving your layout scheme. That service would also coordinate the loading of views (by having a reference to the Region Manager).

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi