Composite application Guidance for WPF (4)--bootstrapper

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.