Sep 22, 2010 at 7:07 PM

I'm interested in grabbing InitParams, which come in as eventparams in the Application.Startup event. I want to use these to determine the default view (and thus RootVisual) to be displayed on startup of my app. 

The problem is that it appears Application.Startup only gets run when I assign my first view/viewmodel. So, I have a chicken and egg problem. Is there another way to fetch InitParams in Caliburn.Micro?

If not, is there a preferred method of going about things, different from how I am now?



Sep 22, 2010 at 7:09 PM

This is a Silverlight 4 app, using Caliburn.Micro. 



Sep 22, 2010 at 7:14 PM

You should inherit from the non-generic Bootstrapper and override OnStartup. Execute your custom rules in there and assign the Application.RootVisual to whatever you want. 

Sep 22, 2010 at 8:37 PM

Thanks, Rob. Worked like a charm.