How to create a Metro Live Tiles in C#
By Tan Lee Published on May 28, 2017 11.96K
Creating Metro Live Tiles using the Metro Framework in C# involves a few key steps.
Below is a guide to help you create Live Tiles for a Windows application using the Metro UI style.
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.
Next, Right click on your project select Manage NuGet Packages -> Search metro framework -> Install
Drag and drop the MetroTile
control from the Visual Studio Toolbox onto your form designer, then design your metro form as shown below.
You need to add a timer control to your metro form, then modify your code to handle metro live title as shown below.
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 TUTORIAL
- How to Create a Metro GridView in C#
- How to Download and Install Metro Framework
- How to create a Metro Message Box in C#
- How to use Modern UI Metro Framework in C#
- How to use Modern UI Metro Framework in C#
- How to Create CPU and Memory Monitor using Metro Modern UI in C#
- How to Create a Metro Modern Flat UI Dashboard in C#
- How To Use Metro Framework Metro Style Manager in C#
Categories
Popular Posts
11 Things You Didn't Know About Cloudflare
Dec 19, 2024
Gentella Admin Template
Nov 14, 2024
Login SignUp form using HTML CSS JS
Nov 11, 2024
Freedash bootstrap lite
Nov 13, 2024