How to Create a Material Design Login Form in C#
By FoxLearn 7/22/2024 2:13:53 AM 36.89K
The Material Skin is an open source support c# ui framework that helps you design a modern ui form using google material design.
How to create a login form in C#
To create a material login form in C# you can use material skin, you'll need to follow these steps.
Open your project in Visual Studio, right-click on your project in the Solution Explorer, then select Manage NuGet Packages -> Search for "MaterialSkin" and install it
Design your login form in Visual Studio
Drag and drop MaterialSingleLineTextFiled, MaterialCheckBox, MaterialRaisedButtonDesign, MaterialDivider and MaterialLabel from the Visual Studio toolbox to your winform, then layout your ui login form as shown below.
If you don't see the material controls in your Visual Studio toolbox, you need to drag the material library into your Visual toolbox.
To create the material design you need to change inheritance from your Form to MaterialForm as the following c# code.
// Add MaterialSkin components to your form // Initialize MaterialSkinManager in your form constructor public partial class Form1 : MaterialSkin.Controls.MaterialForm { public Form1() { InitializeComponent(); //Init material skin MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance; skinManager.AddFormToManage(this); skinManager.Theme = MaterialSkin.MaterialSkinManager.Themes.LIGHT; skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Green900, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Blue500, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE); } private void Form1_Load(object sender, EventArgs e) { } }
You can easily write c# form skin theme as show above to apply your winform. Through the material skin c# example, i hope so you can learn how to use material skin c# .net to create a modern ui using google material design principles.
VIDEO TUTORIAL