Windows Forms: Metro Live Tiles in C#
By FoxLearn 5/28/2017 10:20:11 AM 11.1K
How to Create a Metro Live Tiles using Metro Framework, Metro UI in C#
Step 1: Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "MetroLiveTitle" and then click OK
Step 2: Right click on your project select Manage NuGet Packages -> Search metro framework -> Install
Step 3: Design your metro form as below
You need to add a timer control to your metro form
Step 4: Add code to handle metro live title
using System; using System.Drawing; namespace MetroLiveTile { public partial class Form1 : MetroFramework.Forms.MetroForm { public Form1() { InitializeComponent(); } //Change image, background private void timer1_Tick(object sender, EventArgs e) { if (metroTile1.BackColor == Color.LightSkyBlue) { metroTile1.Text = "FoxLearn"; metroTile1.BackColor = Color.ForestGreen; metroTile1.UseTileImage = false; } else { metroTile1.Text = "Skype"; metroTile1.BackColor = Color.LightSkyBlue; metroTile1.UseTileImage = true; metroTile1.Refresh(); } // if (metroTile7.BackColor == Color.DeepSkyBlue) { metroTile7.Text = "FoxLearn"; metroTile7.BackColor = Color.Orange; } else { metroTile7.Text = "Skype"; metroTile7.BackColor = Color.DeepSkyBlue; metroTile7.Refresh(); } } private void Form1_Load(object sender, EventArgs e) { //Start your timer timer1.Start(); } } }
VIDEO TUTORIALS
- 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: Modern UI Login Form 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#