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
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.
- Where and when is the second IEventAggregator constructed?
- How do I force a common IEventAggregator in all created Shells?