

Material Design Extensions 在WPF開源控件庫 Material Design in XAML Toolkit(本站介紹:鏈接)的基礎上進行了控件擴展和特性新增。本開源項目中的控件或許不在Material Design specification明確規定中,在使用時也不會和Material Design in XAML Toolkit沖突,請放心使用.

NuGet

安裝NuGet包.
PM> Install-Package MaterialDesignExtensions
程序可在.NET Core 3.1 和 .NET Framework 4.5編譯。
開始
- 創建WPF桌面應用程序
- 通過NuGet安裝Material Design Extensions
- 在你的App.xaml文件中添加樣式(參考demo中的App.xaml)
- 在你的XAML文件中添加命名空間
xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
- 你可以使用本控件庫了
重點提示
為了能夠在運行時更改主題,Material Design Extensions v2.6.0的配置發生了更改。請根據Demo的App.xaml修改配置。
控件
Material Design Extensions具有以下控件:
| Control | Details | Status |
|---|---|---|
| Stepper | Custom Stepper control (specification) | Done |
| Oversized number spinner | Custom OversizedNumberSpinner control | Done |
| Grid list | Templates for ListBox to render as a grid list (specification) | Done |
| Open directory | Custom OpenDirectoryControl and OpenDirectoryDialog control | Done |
| Open file | Custom OpenFileControl and OpenFileDialog control | Done |
| Save file | Custom SaveFileControl and SaveFileDialog control | Done |
| Open multiple directories | Custom OpenMultipleDirectoriesControl and OpenMultipleDirectoriesDialog control | Done |
| Open multiple files | Custom OpenMultipleFilesControl and OpenMultipleFilesDialog control | Done |
| Text box with file path | Custom TextBoxOpenDirectory, TextBoxOpenFile and TextBoxSaveFile control | In development |
| App bar | Custom AppBar control (specification) | Done |
| Persistent search | Custom PersistentSearch control (specification) | Done |
| Side navigation | Custom SideNavigation control (specification) | Done |
| Navigation rail | Custom NavigationRail control (specification) | In development |
| Autocomplete | Custom Autocomplete control | Done |
| Text box suggestions | Custom TextBoxSuggestions control | Done |
| Tabs | Templates for TabControl (specification) | Done |
| Material window | Custom MaterialWindow control | Done |
截圖
Horizontal stepper

Vertical stepper

Side navigation

Navigation rail

Tabs

Material window and app bar

Open directory

Open file

Save file

Grid list

Persistent search

Autocomplete

Oversized number spinner

文檔
API文檔:網址
協議
Material Design Extensions基於MIT協議
原文鏈接:https://dotnet9.com/16565.html
歡迎關注我的微信公眾號:Dotnet9

