Bootstrapper initialized Event

Topics: Prism v4 - WPF 4
Apr 24, 2015 at 12:57 PM
Dear all,

How do I know that the Bootstrapper has all Modules and the Shell initialized?
In the documentation is is explained how the initialization of the bootstrapper is handled. (https://msdn.microsoft.com/en-us/library/gg430868%28v=pandp.40%29.aspx)

In my case I want to show the a login view, as soon the shell & the modules are initialized, but I do not know where I should do this.

Thank you,
Manullino
Apr 24, 2015 at 2:08 PM
To understand it better, I recommend you just check out the sequence of calls that happen in the Bootstrapper base class Run() method.

But to answer your question, the sure fire way is to override Run in your bootstrapper, call the base.Run() method and then put whatever code you need after that as the stuff that has to happen after the Shell and Modules are initialized. Just realize that does not guarantee they are completely finished loading and being presented on screen. Only way to be sure of that is to handle Loaded events in the Shell itself and in whatever Module screens are loaded by the Initialize methods in the Modules.
Apr 25, 2015 at 11:36 AM
Edited Apr 25, 2015 at 11:39 AM
Hi Brian,

thank you for your answer.

I got it, I am using the Window_ContentRendered event, everything works now!

Thank you,
Manullino