Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

Repository files navigation

Archiving

Due to the release of Windows 11 this library will no longer be maintained. If you want similar functionality but in a newer release see WPF UI.

Material WPF

Created with ❤️ in Poland by lepo.co
A simple and uncomplicated way to make your application written in WPF keep up with modern design trends. Library changes the base elements like Window, Page or Button, and also includes additional controls like Navigation, ToggleButton or Snackbar. It's not really material, but a mixture of Fluent, Material and Cupertino.

GitHub licenseNETNugetNuget (with prereleases)Nuget

What's included?

NameFrameworkBuild Status
MaterialWPF
Library that allows you to use all features in your own application
.NET 6.0 Windows,
.NET 5.0 Windows,
.NET Core 3.1
.NET Framework 4.8
Build status
MaterialWPF.Demo
An application written in WPF .NET 5 where you can test the features.
.NET 6.0 Windows 11Build status

Custom controls

ControlNamespaceDescription
ToastMaterialWPF.UIClass with which you can send a Toast to the Windows notification center.
MiconIconsMaterialWPF.UIA collection of all Micon font glyphs that you can use in an application.
DialogMaterialWPF.ControlsA control that you can display in the middle of the application, e.g. with a "Save as" information or whatever...
HyperlinkMaterialWPF.ControlsA button that navigates to the browser window.
IconMaterialWPF.ControlsPrepared TextBlock with "Glyph" attribute with which you can select an icon.
MaterialButtonMaterialWPF.ControlsA modern button with all the possibilities of a regular "Button" and an icon on the left.
MessageBoxMaterialWPF.ControlsA custom MessageBox that can contain selected controls.
NavigationMaterialWPF.ControlsSimple ListView with a hamburger menu button. After assigning elements and Frame, it allows to navigate through the application.
SnackbarMaterialWPF.ControlsA card with a pop-up animation that can act as a notification of an action for the user.
SplashMaterialWPF.ControlsThe tab that can be used to cover the main view of the application while loading resources, the equivalent of UWP.
ToggleButtonMaterialWPF.ControlsA button like a Checkbox that switches with animation.
WindowNavigationMaterialWPF.ControlsA set of buttons that can replace the default window navigation, giving it a new, modern look.

How to implement?

Add resources to App.xaml

<Applicationx:Class="YourMainNamespace.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:YourMainNamespace"StartupUri="MainWindow.xaml"><Application.Resources><ResourceDictionary><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="pack://application:,,,/MaterialWPF;component/Styles/ThemeDark.xaml" /><ResourceDictionary Source="pack://application:,,,/MaterialWPF;component/Styles/Material.xaml" /></ResourceDictionary.MergedDictionaries></ResourceDictionary></Application.Resources></Application>

Sample Window

(without logic)

<Windowx:Class="YourMainNamespace.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:materialwpf="clr-namespace:MaterialWPF.Controls;assembly=MaterialWPF"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"Width="1160"Height="612"Style="{StaticResource MaterialNavigationWindow}"WindowStartupLocation="CenterScreen"
mc:Ignorable="d"><Grid><!--An example of splitting the window grid to make everything look nice --><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition Width="*"/></Grid.ColumnDefinitions><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="*"/></Grid.RowDefinitions><!--Navigation Control, displays buttons for navigating pages --><materialwpf:Navigation
x:Name="rootNavigation"
Grid.Row="0"Grid.RowSpan="2"
Grid.Column="0"/><!--Main content frame, instances of the Page class are loaded into it --><Grid Grid.Row="1" Grid.Column="1"><Frame x:Name="rootFrame"/></Grid><!--Buttonsfor navigating the application window (minimize,maximize,close)--><materialwpf:WindowNavigation Grid.Row="0" Grid.Column="1" /><!--Splash to make the app look nice on startup. You can use it while loading resources--><materialwpf:Splash
x:Name="mainSplash"Grid.RowSpan="2"
Grid.ColumnSpan="2"/></Grid></Window>

How can I help improve it?

The MaterialWPF team welcomes feedback and contributions!
If you have any suggestions or improvements, don't hesitate to create an issue.

Third party solutions

License

MaterialWPF is free and open source software licensed under MPL 2.0. You can use it in private and commercial projects. Keep in mind that you must include a copy of the license in your project.

About

A simple and uncomplicated way to make your application written in WPF keep up with modern design trends. Library changes the base elements like Window, Page or Button, and also includes additional controls like Navigation or Popup.

Topics

Resources

Stars

19 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages