When developing in WPF, it is often useful to manually create the main window of the app in the Application Startup event after performing other initialization tasks. You can even do this in Silverlight. However in a Windows Phone app, it doesn’t look like I have the option to manually create a new MainPage() and set it as the root visual like I would in Silverlight.
This is kind of annoying, because I’m forced to do some of my initialization in the MainPage constructor when I think it should happen somewhere in the Business layer. Is there a good way to control (in code) when and how the MainPage is created?
After getting it to work by trial and error, I found blog post I needed with the necessary information. Go figure.