Theming .NET WinForms, C# or VB.Net, to Google's Material Design Principles.
嵌入 HarmonyOS Sans - HarmonyOS Sans 字体 替换思源黑体
嵌入 Source Han Sans - 思源黑体中文字体替换原生字体
更改字体后的 MaterialSkin 组件简单演示:
The MaterialSkin Drawer (menu).
Every MaterialSkin button variant - this is 1 control, 3 properties
The MaterialSkin checkboxes, radio and Switch.
Material skin textfield
Table control
Progress bar
List Box
Expansion Panel
Label
Component | Supported | Disabled mode | Animated |
---|---|---|---|
Backdrop | No | - | - |
Banner | No | - | - |
Buttons | Yes | Yes | Yes |
Cards | Yes | N/A | N/A |
Check Box | Yes | Yes | Yes |
Check Box List | Yes | Yes | Yes |
Chips | No | - | - |
Combobox | Yes | Yes | Yes |
Context Menu | Yes | Yes | Yes |
Date Picker | No | - | - |
Dialog | Yes | N/A | No |
Divider | Yes | N/A | N/A |
Drawer | Yes | N/A | Yes |
Expansion Panel | Yes | Yes | No |
Flexible Dialog (big) | Yes | Yes | N/A |
FAB - Floating Action Button | Yes | Yes | Yes |
Label | Yes | Yes | N/A |
ListBox | Yes | Yes | N/A |
ListView | Yes | No | N/A |
Progress Bar | Partial | No | No |
Radio Button | Yes | Yes | Yes |
Text field | Yes | Yes | Yes |
Sliders | Yes | Yes | No |
SnackBar | Yes | N/A | Yes |
Switch | Yes | Yes | Yes |
Tabs | Yes | N/A | Yes |
Time Picker | No | - | - |
Tooltips | No | - | - |
All supported components have a dark theme
There are a few methods to add this lib:
Download the precompiled DLL available on the releases section and add it as a external reference on your project.
Clone the project from GitHub, then add the MaterialSkin.csproj to your own solution, then add it as a project reference on your project.
Simply drag the MaterialSkin.dll file into your IDE's ToolBox and all the controls should be added there.
Open the code behind your Form you wish to skin. Make it inherit from MaterialForm rather than Form. Don't forget to put the library in your imports, so it can find the MaterialForm class!
public partial class Form1 : MaterialForm
Partial Class Form1
Inherits MaterialSkin.Controls.MaterialForm
Set your preferred colors & theme. Also add the form to the manager so it keeps updated if the color scheme or theme changes later on.
public Form1()
{
InitializeComponent();
var materialSkinManager = MaterialSkinManager.Instance;
materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
}
Imports MaterialSkin
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim SkinManager As MaterialSkinManager = MaterialSkinManager.Instance
SkinManager.AddFormToManage(Me)
SkinManager.Theme = MaterialSkinManager.Themes.LIGHT
SkinManager.ColorScheme = New ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE)
End Sub
End Class