By default, the WPF program's startup way specifies Starturi in the XAML of the app, and then the IDE automatically helps us generate a main method and then starturi the window specified in the new one out and serves as the main window for the application, but we composite Application Guidance for WPF (3)--Creates the first composite WPF application (if you do not understand how prism is started, it is recommended that you read) to change this way:
Public App ()
{
var boot = new Bootstrapper ();
Boot. Run ();
}
And bootstrapper is similar to this type:
Class Bootstrapper:unitybootstrapper
{
protected override DependencyObject Createshell ()
{
var shell = new Shell ();
Shell. Show ();
return shell;
}
protected override Imoduleenumerator Getmoduleenumerator ()
{
var configstory = new Configur Ationstore ();
var enumerator = new Configurationmoduleenumerator (configstory);
return enumerator;
}
}
Where the shell is essentially the main window of our application, it can be seen that the main window is displayed in the Createshell () method, so why don't we look at the bootstrapper in the prism