EventAggregator gets replaced in multiple shell application

Topics: Prism v4 - WPF 4
Oct 30, 2014 at 10:53 AM
In an application I create a primary shell in the usual way using a bootstrapper that calls ConfigureModuleCatalog, CreateShell and InitializeShell in this order. Works fine.
In order to display a new window with detailed information on a patient selected in one of the primary shell's Views a new PatientBootstrapper gets executed that creates a new Shell. It also includes the ConfigureModuleCatalog, CreateShell and InitializeShell sequence.
During this process a Presenter associated with a View registered in this new shell subscribes to an Event using an IEventAggregator injected in its constructor (through the Unity framework). At a later stage that Event is fired from the primary Shell's content, also using an injected IEventAggregator.
It turn's out that both IEventAggregators are different, judging from the Events registered in them. One is associated with the primary Shell, the other with the new Shell. As a result there is no follow-up to the fired event.
Questions:
  1. Where and when is the second IEventAggregator constructed?
  2. How do I force a common IEventAggregator in all created Shells?
Oct 31, 2014 at 8:49 AM
Regarding question 2:
In the new PatientBootstrapper I now bypass ConfigureModuleCatalog altogether. Instead I resolve the initializers of the Modules directly, passing the original EventAggregator as an injected constructor parameter. This initializer in turn passes the EventAggregator to the Presenter(s), after which their associated Views are registered with regions in the usual way.
Still it seems awkward that the standard facilities of ConfigureModuleCatalog cannot be used to handle the initialization and registration in this case.