WPF Skin's Mathapps.metro UI Library

Source: Internet
Author: User

It's easy to use metro style in WPF, you can draw it yourself.

But in order to save time, ha, today we recommend a foreign Metro style control library.

This article only plays the role, has the interest or the recommendation everybody official Officer Net, Thanks, the website address I will send at the bottom.

Use steps

One, use NuGet package management, add references

Install-package Mahapps.metro

Or use Interface management:

Second, modify the App.xaml file, reference resources

<Applicationx:class= "Metrowpf.app"xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x= "Http://schemas.microsoft.com/winfx/2006/xaml"StartupUri= "MainWindow.xaml">    <application.resources>        <ResourceDictionary>            <resourcedictionary.mergeddictionaries>                <ResourceDictionarySource= "Pack://application:,,,/mahapps.metro;component/styles/controls.xaml" />                <ResourceDictionarySource= "Pack://application:,,,/mahapps.metro;component/styles/fonts.xaml" />                <ResourceDictionarySource= "Pack://application:,,,/mahapps.metro;component/styles/colors.xaml" />                <ResourceDictionarySource= "Pack://application:,,,/mahapps.metro;component/styles/accents/blue.xaml" />                <ResourceDictionarySource= "Pack://application:,,,/mahapps.metro;component/styles/accents/baselight.xaml" />            </resourcedictionary.mergeddictionaries>        </ResourceDictionary>    </application.resources></Application>

Third, change the form to Metro style

The following xmlns references are made in a XAML-like body.

    1. xmlns:controls="Clr-namespace:mahapps.metro.controls;assembly=mahapps.metro"

Then replace the window tag with the following label

    1. <controls:metrowindow ...

It's OK.

Iv. modification of CS file inheritance Metrowindow class

// References using  namespace  metrowpf{    //<summary>     ///  Interactive logic    for MainWindow.xaml /// </summary>public    Partial  class  mainwindow:metrowindow    {        public  MainWindow ()        {            InitializeComponent ();     }}}

Website address: http://mahapps.com/

More Posts: http://www.wxzzz.com/1202.html

WPF Skin's Mathapps.metro UI Library

Related Article

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.