Metro UI or Modern UI Application WPF using MahApps
To create Metro or Modern UI looking application in WPF. You just have to follow below steps also to download code shown in demo can be downloaded from link below.
Step 1: Add Nuget MahApps.Metro
Step 2: Copy below in App.xaml as App Resource
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Green.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedTabControl.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Note: in above resources you can change theme by chanding BaseLight to BaseDark or by Changing Green to different colors like Blue, Red, etc.
Step 3: Copy below mentioned xaml name spaces in MainWindow.xaml or any other WPF window:
xmlns:fsxaml="http://github.com/fsprojects/FsXaml"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
Step 4: Change class inherited in MainWindow.cs or other WPF window.cs file with
MahApps.Metro.Controls.MetroWindow
Step 5: You are ready :)
To Download example click here.