Comprehensive and easy to use Material Design theme and control library for the Windows desktop (WPF).
See screenshots
Note
See the full starting guide for more in-depth information.
This quick guide assumes you have already created a WPF project and are using Microsoft Visual Studio 2022.
Install-Package MaterialDesignThemes
App.xaml
<Application
x:Class="Example.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
If you want to target Material Design 3, alter the ResourceDictionary
line in the snippet above to use MaterialDesign3.Defaults.xaml
.
Alter your MainWindow.xaml
<Window [...]
Style="{StaticResource MaterialDesignWindow}"
[...] >
To build the project, following is required:
This repository also contains 3 different demo applications:
MaterialDesignDemo
- Reference WPF app with Material Design 2 styling, this contains all controls and is a recommended tool when developing apps with this libraryMaterialDesign3Demo
- Reference WPF app with Material Design 3 styling, under developmentMahAppsDragablzDemo
- Demo app for combining with Dragablz and MahAppsWarning
The screenshots below are taken from the Material Design 2 demo app. It is possible that these are out of date. Run the demo app from latest source to see the latest version.
Before contributing code read the Contribution Guidelines
material-design-in-xaml
Want to say thanks? ?
This project exists thanks to all the people who contribute.
Thank you to all our backers! Become a backer.
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor.