Windows Forms: Modern UI Login Form in C#
By FoxLearn 3/20/2020 6:53:13 PM 30.59K
To create the metroframework modern ui sample project in c#, you need to install the metroframework by right-clicking on your project, then select Manage NuGet Packages -> Search metro framework -> Install it on your project.
As you know, Metro Framework is an open source using c# ui framework, you can download and install metro framework from nuget or github. If you don't see the metro framework toolbox, you can view How to download and install metro framework
To make the metro modern ui login, you can drag the PictureBox, MetroTextBox, MetroButton and MetroCheckBox controls from the visual studio toolbox to your winform, then design a simple ui metro login form as shown below.
To make the metro or modern ui style windows application in c#, you need to change inheritance from the Form to MetroForm, then you can add code to handle metroframework change color for the metro form as the following c# code.
public partial class Form1 : MetroFramework.Forms.MetroForm//Replace System.Windows.Forms.Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { //initialize metro style or theme this.StyleManager = metroStyleManager1; metroStyleManager1.Theme = MetroFramework.MetroThemeStyle.Light; metroStyleManager1.Style = MetroFramework.MetroColorStyle.Green; } }
Through this tutorial, you learned how to use metroframework to design the modern ui, as well as how to use some controls in the metro framewok library in c# winform ui design.
VIDEO TUTORIAL
- Windows Forms: Metro TextBox in C#
- Windows Forms: Metro Message Box in C#
- Download and Install Metro Framework
- Windows Forms: Metro GridView in C#
- Windows Forms: Metro ListView in C#
- Windows Forms: How to use WinForms Modern UI Metro Framework in C#
- Windows Forms: Modern UI Metro Framework Windows 8 UI in C#
- Windows Forms: How to use Winforms Modern UI Metro Framework in C#