MahApp MetroWindow project setup

WPF

Install the MahApps.Metro package

Change the window to MetroWindow:



<Controls:MetroWindow ...
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
...
>
...
</Controls:MetroWindow>

Add this to 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/Themes/Light.Blue.xaml" />
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

Post a Comment

Previous Post Next Post