This tutorial shows you how to use Material Design in WPF using c# code.

Use Material Design In XAML Toolkit you can easily bring beautiful desktop applications to life, using a modern and popular design language.

Features

  • Styles and variations for the majority of standard WPF controls
  • Many more additional controls to support the Material Design aesthetic and flow
  • Easy configuration of Material Design Colour palettes at both design and run time
  • Transitions API for easy build GUI animations
  • Works stand-alone, and also compatible with other popular WPF frameworks, MahApps and Dragablz
  • MVVM framework agnostic

Comprehensive and easy to use Material Design theme and control library for the Windows desktop.

wpf material design

Standard WPF Control Styles

material design wpf

Material Design Specific Controls

material design clock

To play demo, you need to create a new wpf project, then install the material design from Manage Nuget Packages or you can download it directly from https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit

Open your App.xaml, then edit as shown below

<?xml version="1.0" encoding="UTF-8"?>
<Application . . .>
  <Application.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Application.Resources>
</Application>

Open the MainWindow.xaml to edit as the following

<Window
     xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
     TextElement.Foreground="{DynamicResource MaterialDesignBody}"
     TextElement.FontWeight="Regular"
     TextElement.FontSize="13"
     TextOptions.TextFormattingMode="Ideal"
     TextOptions.TextRenderingMode="Auto"
     Background="{DynamicResource MaterialDesignPaper}"
     FontFamily="{DynamicResource MaterialDesignFont}">
  <Grid>
    <materialDesign:Card Padding="32" Margin="16">
      <TextBlock Style="{DynamicResource MaterialDesignTitleTextBlock}">My First Material Design App</TextBlock>
    </materialDesign:Card>
  </Grid>
</Window>

I hope you can find the best library to build an awesome ui for your wpf project