Windows Forms: Modern UI Login Form in C#

This post shows you how to create a modern ui login form using metro framework in c# windows forms application.

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 PictureBoxMetroTextBox, MetroButton and MetroCheckBox controls from the visual studio toolbox to your winform, then design a simple ui metro login form as shown below.

design metro login form in c#

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()

    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.