Modern UI for WPF open-source project (3): Use a template to create my first modern UI app

Source: Internet
Author: User

Create a modern UI app using the project template

Before doing this, make sure that the modern UI for WPF templates extension for Visual Studio 2012 is installed.

    • Download and install the vsix extension fromVisual Studio Gallery


    • In Visual Studio 2012, open the Extension Manager (Tools>Extensions and updates)
    • SelectOnline>Visual Studio GalleryAnd search'Modern UI'
    • SelectModern UI for WPF templatesAnd clickDownloadTo download and install.

1. Create a new project and select a new template: Modern ui wpf Application

This applicationProgramThe template contains two pages: Home. XAML and setting. XAML and mainwindow. XAML.

The settings page provides some style setting options. Pages are usually placed in the pages project folder. The content folder is often used by standard WPF user controls to be referenced by various pages.

2. Compile and run the program. You can see the following results:

3. Right-click the pages folder and selectAdd> new project... Add a new basic layout page. In the Add new project dialog box, select basic page from the modern UI for WPF list. Name basicpage. XAML and click Add

4. reference the new page to the main menu. Open mainwindow. XAML and find the Mui: modernwindow. menulinkgroups Element Definition main menu. Add a new link to the menu group and name it "welcome" as follows:

      "  source = 
      /pages/home. XAML  
        my page  
       "  source = 
       /pages/basicpage. XAML  

5. Compile and run the program. Select the my page option in the main menu. You can see the following results:

In this way, a new modern UI application project is created and the page is added using the visusal studio extension template. Point to a new page by adding a link.


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: 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.