Skip to content

SyncfusionExamples/how-to-set-two-different-title-bar-text-for-minimized-and-normal-maximized-state-of-winforms-metro-f

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to Set Two Different TitleBar Text for Minimized and Normal/Maximized State of WinForms MetroForm?

This sample illustrates how to set two different title bar text for minimized and normal/maximized state of WinForms MetroForm.

In MetroForm, by default the text displayed in the title bar will be same when the form is in normal/maximized state and minimized state. You can set different title bar text for normal/maximized state and minimized state by using Resize event of the form.

C#

public Form1()
{
    InitializeComponent();
    this.Text = "Form1";
    this.Resize += On_Form1_Resize;
}

private void On_Form1_Resize(object sender, EventArgs e)
{
    if (this.WindowState == FormWindowState.Normal || this.WindowState == FormWindowState.Maximized)
        this.Text = "Form1";
    else if (this.WindowState == FormWindowState.Minimized)
        this.Text = "Form1 - Minimized";
}

Requirements to run the demo

Visual Studio 2015 and above versions

About

How to set two different title bar text for minimized and normal/maximized state of WinForms MetroForm?

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages