랭킹으로 돌아가기

MaterialDesignInXAML/MaterialDesignInXamlToolkit

C#

Google's Material Design in XAML & WPF, for C# & VB.Net.

c-sharpmaterialxamlthemedragablzdesignmaterial-designwpfhacktoberfesthacktoberfest2020
스타 성장
스타
16.2k
포크
3.5k
주간 성장
이슈
151
5k10k15k
2015년 2월2018년 11월2022년 9월2026년 7월
README

Material Design In XAML Toolkit Logo of Material Design in XAML

NuGet-Themes NuGet-Colors

NuGet-Themes-CI NuGet-Colors-CI

Backers on Open Collective Sponsors on Open Collective Chat Issues

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

  • Material Design styles for all major WPF Framework controls
  • Additional controls to support the theme, including Multi Action Button, Cards, Dialogs, Clock
  • Easy configuration of palette (at design and runtime), according to Google's guidelines
  • Full Material Design Icons icon pack
  • Easy transition effects
  • Compatible with Dragablz, MahApps
  • Demo applications included in the source project

See screenshots

Table of contents

Getting started

[!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 the toolkit through the visual NuGet package manager in Visual Studio or use the following command:
Install-Package MaterialDesignThemes
  • Alter your 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}"
  [...] >

XML Namespaces

The toolkit exposes two XML namespaces for use in XAML:

Prefix URI Description
materialDesign http://materialdesigninxaml.net/winfx/xaml/themes Primary namespace for all public Material Design types, controls, and converters.
materialDesignInternal http://materialdesigninxaml.net/winfx/xaml/themes-internal Namespace for types in internal sub-namespaces (MaterialDesignThemes.Wpf.Internal, MaterialDesignThemes.Wpf.Converters.Internal, MaterialDesignThemes.Wpf.Behaviors.Internal).

[!WARNING] Types exposed via the materialDesignInternal namespace are considered internal implementation details and are not guaranteed to maintain backwards-compatibility between versions. Use them at your own risk.

To use the internal namespace in XAML:

<Window ...
  xmlns:materialDesignInternal="http://materialdesigninxaml.net/winfx/xaml/themes-internal">

Building the source

To build the project, following is required:

  • Microsoft Visual Studio 2022
  • .NET desktop development workload

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 library
  • MaterialDesign3Demo - Reference WPF app with Material Design 3 styling, under development
  • MahAppsDragablzDemo - Demo app for combining with Dragablz and MahApps

Screenshots

Material Design 3 demo app screenshots

Buttons Cards Chips Colortool Colorzones Comboboxes Datagrids Dialogs Drawer Elevation Expander Fields Fieldslineup Groupboxes Home Iconpack Lists Menustoolbars Navigationbar Navigationrail Pallete Pickers Progressindicators Ratingbar Slider Snackbar Toggles Tooltips Transitions Trees Typography

Material Design 2 demo app screenshots

[!WARNING] The screenshots below are taken from the Material Design 2 demo app. Material Design 3 is the latest version, so the UI shown here may differ from the latest design.

Screenshot of WPF Material Design 2 demo application home page Buttons Toggles Fields ComboBoxes Palette Color Tools Pickers Icons Cards Menus and Toolbars Progress Bars Dialogs Lists Tree View Sliders Chips Typography Group Box Snackbars Elevation Colorzones Datagrids Drawer Expander Fieldslineup Navigationrail NumericUpDown Ratingbar Tabs Tooltips Transitions

More examples

FAQ

Contributing

Before contributing code read the Contribution Guidelines

Want to say thanks? 🙏🏻

  • Hit the :star: star :star: button
  • If you'd like to make a very much appreciated financial donation please visit open collective

This project exists thanks to all the people who contribute.

Mentions

Backers

Thank you to all our backers! 🙏 Become a backer.

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor.

관련 저장소
shadowsocks/shadowsocks-windows

A C# port of shadowsocks

C#Othershadowsocksc-sharp
59.6k16.2k
AvaloniaUI/Avalonia

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The future of .NET UI

C#MIT Licensec-sharpxaml
avaloniaui.net
31.2k2.8k
google/flatbuffers

FlatBuffers: Memory Efficient Serialization Library

C++Apache License 2.0flatbuffersserialization
flatbuffers.dev
26.2k3.6k
icsharpcode/ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!

C#MIT Licensedecompilerdecompiler-engine
25.7k3.7k
CodeHubApp/CodeHub

CodeHub is an iOS application written using Xamarin

C#codehubc-sharp
codehub-app.com
22.6k609
QuantConnect/Lean

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)

C#Apache License 2.0c-sharpalgorithmic-trading-engine
lean.io
20.6k5.1k
microsoft/CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit

C++Othercognitive-toolkitcntk
docs.microsoft.com/cognitive-toolkit/
17.6k4.2k
duplicati/duplicati

Store securely encrypted backups in the cloud!

C#Otherduplicatibackup
14.8k1.1k
dotnet/efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

C#MIT Licenseentity-frameworkdatabase
learn.microsoft.com/ef/
14.7k3.4k
abpframework/abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.

C#GNU Lesser General Public License v3.0abpcsharp
abp.io
14.4k3.7k
MonoGame/MonoGame

One framework for creating powerful cross-platform games.

C#Otherxnamonogame
monogame.net
14.2k3.1k
QuestPDF/QuestPDF

QuestPDF is a modern library for PDF document generation. Its fluent C# API lets you design complex layouts with clean, readable code. Create documents using a flexible, component-based approach.

C#Otherpdfnuget
questpdf.com
14.1k765