Using Metro Style in an Application

Using Styles

To use metro style in your WPF apps, add the following resource dictionaries into the App.xaml of you application.
There're several themes shipped with this lib, the dark theme and the light theme. Below are the code to apply one theme to your app.
For example, add this resource dictionary for dark theme:
<ResourceDictionary Source="pack://application:,,,/MetroWPF;component/Themes/Dark.xaml"/>
Add this one for light theme:
<ResourceDictionary Source="pack://application:,,,/MetroWPF;component/Themes/Light.xaml"/>
Then, this resources dictionary of Control styles should be added:
<ResourceDictionary Source="pack://application:,,,/MetroWPF;component/Themes/ControlStyles.xaml"/>
Go here to see more themes

Using Controls

Metro WPF provides some controls that WPF doesn't provide, to use them, add the following xml namespace to the root element of your .xaml file:
and you can use the metro controls with m: prefix:

Last edited Jun 18, 2013 at 12:36 AM by HenryZhu, version 2


dizzley Jan 13, 2015 at 12:08 PM 
To add both theme resource files into App.xaml, you can use the syntax:
<ResourceDictionary Source="pack://application:,,,/MetroWPF;component/Themes/Dark.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MetroWPF;component/Themes/ControlStyles.xaml"/>

HenryZhu Aug 13, 2013 at 3:50 PM 
Hi Ebrahim,
you just need to add the resource dictionaries above into your App.xaml. and use your controls as normal. the styles will be applied to your controls automatically. BTW, we are preparing a new release which will contain a demo project as well.

Ebrahim_rad Jul 11, 2013 at 3:41 PM 
i downloaded your files and imported in my project
i don't know how to use it in my code exactly.
if any body can make an example it will be a very great help to me,
thanks in advance.