A complete implementation of Google's Material Design 3 specification for WPF applications, built from scratch in C#.
This library provides a comprehensive set of Material Design 3 components and styles for WPF applications. Unlike other Material Design implementations, this library is built from the ground up following the official Material Design 3 guidelines.
- Color System: Full MD3 color palette with light theme support
- Typography: Complete type scale (Display, Headline, Title, Body, Label)
- Shapes: All corner radius tokens (ExtraSmall to ExtraLarge)
- Elevation: 6 elevation levels with proper shadows
- Motion: MD3 motion curves and durations
- Buttons: Filled, Elevated, Tonal, Outlined, Text buttons
- Icon Buttons: Standard, Filled, Filled Tonal, Outlined variants
- Floating Action Buttons: Standard, Small, Large, Extended FABs
- Cards: Elevated, Filled, Outlined cards with elevation support
- Checkboxes: With proper states and animations
- Switches: Material Design toggle switches
- Radio Buttons: Proper grouping and states
- Sliders: Continuous and discrete sliders
- Text Fields: Filled and Outlined variants with floating labels
- ComboBox: Filled and Outlined with proper dropdown behavior
- Chips: Assist, Filter, Input, and Suggestion chips
- Progress Indicators: Linear and Circular progress bars
- Badges: Small (dot) and Large (label) badges
- Dividers: Horizontal and vertical dividers
- Lists: Single-line, Two-line, Three-line list items
- Navigation Drawer: Standard navigation drawer with items
- Tabs: Tab control with proper indicators
- Menus: Context menus and menu bars
- Dialogs: Modal dialogs with custom content support
- Snackbars: Temporary messages with optional actions
- Tooltips: Plain and rich tooltips
All components come with pre-defined styles following MD3 specifications:
<!-- Filled Button -->
<Button Content="Click Me" Style="{DynamicResource MaterialDesignFilledButtonStyle}" />
<!-- Outlined Text Field -->
<TextBox Style="{DynamicResource MaterialDesignOutlinedTextBoxStyle}"
helpers:TextFieldAssist.Label="Label Text" />
<!-- Elevated Card -->
<Border Style="{DynamicResource MaterialDesignElevatedCardStyle}" Padding="16">
<TextBlock Text="Card Content" />
</Border>
<!-- FAB -->
<Button Style="{DynamicResource MaterialDesignFABStyle}">
<controls:PackIcon Kind="Add" Width="24" Height="24"/>
</Button>- .NET 8.0 SDK or later
- Windows 10/11
- Visual Studio 2022 (recommended)
-
Clone or download this repository
-
Build the library:
cd MaterialDesign.NET dotnet build -
Reference the library in your WPF project:
<ProjectReference Include="..\MaterialDesign.NET\MaterialDesign.NET.csproj" />
-
Merge the resource dictionary in your App.xaml:
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/MaterialDesign.NET;component/Themes/Generic.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources>
<Window x:Class="YourApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:MaterialDesign.NET.Controls;assembly=MaterialDesign.NET"
xmlns:helpers="clr-namespace:MaterialDesign.NET.Helpers;assembly=MaterialDesign.NET"
Title="Your App">
<StackPanel Margin="24">
<!-- Typography -->
<TextBlock Text="Headline" Style="{DynamicResource MdSysTypescale.HeadlineLarge}" />
<!-- Button -->
<Button Content="Click Me"
Style="{DynamicResource MaterialDesignFilledButtonStyle}"
Margin="0,16,0,0" />
<!-- Text Field -->
<TextBox Style="{DynamicResource MaterialDesignFilledTextBoxStyle}"
helpers:TextFieldAssist.Label="Enter text"
Margin="0,16,0,0" />
<!-- Icon -->
<controls:PackIcon Kind="Home" Width="24" Height="24" Margin="0,16,0,0" />
</StackPanel>
</Window>MdSysTypescale.DisplayLarge/Medium/SmallMdSysTypescale.HeadlineLarge/Medium/SmallMdSysTypescale.TitleLarge/Medium/SmallMdSysTypescale.BodyLarge/Medium/SmallMdSysTypescale.LabelLarge/Medium/Small
MdSysColor.Primary/OnPrimary/PrimaryContainer/OnPrimaryContainerMdSysColor.Secondary/OnSecondary/SecondaryContainer/OnSecondaryContainerMdSysColor.Tertiary/OnTertiary/TertiaryContainer/OnTertiaryContainerMdSysColor.Surface/OnSurface/SurfaceContainerMdSysColor.Error/OnError/ErrorContainer/OnErrorContainer- And many more...
material-design.NET/
├── MaterialDesign.NET/ # Core library
│ ├── Controls/ # All MD3 controls
│ │ ├── Button/
│ │ ├── TextField/
│ │ ├── Card/
│ │ ├── Dialog/
│ │ └── ... (17+ components)
│ ├── Helpers/ # Attached properties and helpers
│ │ ├── TextFieldAssist.cs
│ │ ├── ChipAssist.cs
│ │ └── ShadowAssist.cs
│ ├── Converters/ # Value converters
│ ├── Themes/ # Design tokens
│ │ ├── Colors/
│ │ ├── Type/
│ │ ├── Shapes/
│ │ ├── Elevation/
│ │ └── Motion/
│ └── Resources/
│ └── Fonts/
├── MaterialDesign.Demo/ # Demo application
│ ├── Pages/ # Component showcase pages
│ ├── Domain/ # Demo view models
│ └── Styles/
└── docs/ # Documentation
The solution includes a comprehensive demo application showcasing all components:
cd MaterialDesign.Demo
dotnet runThe demo app includes:
- 17 component showcase pages
- Interactive examples
- Source code snippets
- Navigation drawer
- Dialog demonstrations
180+ icons with pre-defined path geometries:
<controls:PackIcon Kind="Home" Width="24" Height="24" />
<controls:PackIcon Kind="Settings" Foreground="Red" />Available icon kinds include: Add, Edit, Delete, Home, Settings, Favorite, Search, and 170+ more.
Alternative icon control using Material Symbols font:
<controls:SymbolIcon Symbol="home" Variant="Outlined" FontSize="24" />
<controls:SymbolIcon Symbol="favorite" Filled="True" />- Follow MD3 specifications
- Maintain consistency with existing components
- Include XML documentation for public APIs
- Test in the demo application
- Dark theme support
- Additional components (Date Picker, Time Picker, Data Table)
- Animation improvements
- Accessibility enhancements
- More icon variants
- Documentation website
- Currently only light theme is supported
- Some advanced MD3 components not yet implemented
- Icon library limited to 180+ icons (PackIcon)
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
