Step 1: Create a new project called MaterialMessageBoxDemo

Step 2: Right click on your project select Manage NuGet Packages -> Search material skin -> install
Step 3: Design forms as below
MessageBox OK: frmOK

MessageBox Yes/No: frmYesNo

Main Form

Create MaterialMessageBox class to handle MessageBox
public static class MaterialMessageBox
{
public static DialogResult Show(string message, string caption, MessageBoxButtons button)
{
DialogResult result = DialogResult.None;
switch (button)
{
case MessageBoxButtons.YesNo:
using (frmYesNo yesNo = new frmYesNo())
{
yesNo.Text = caption;
yesNo.Message = message;
result = yesNo.ShowDialog();
}
break;
case MessageBoxButtons.OK:
using (frmOK ok = new frmOK())
{
ok.Text = caption;
ok.Message = message;
result = ok.ShowDialog();
}
break;
}
return result;
}
}
Add code behind to Main Form
using System.Windows.Forms;
using MaterialSkin;
namespace MaterialMessageBoxDemo
{
public partial class Form1 : MaterialSkin.Controls.MaterialForm
{
MaterialSkin.MaterialSkinManager skinManager;
public Form1()
{
InitializeComponent();
//Init skin
skinManager = MaterialSkinManager.Instance;
skinManager.AddFormToManage(this);
skinManager.Theme = MaterialSkinManager.Themes.DARK;
skinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Grey600, Primary.Grey900, Accent.LightBlue200, TextShade.WHITE);
}
private void materialRaisedButton1_Click(object sender, EventArgs e)
{
if(MaterialMessageBox.Show("Are you sure want to delete this record?", "Message", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
//
}
}
private void materialRaisedButton2_Click(object sender, EventArgs e)
{
MaterialMessageBox.Show("Thank you for watching this video !", "Message", MessageBoxButtons.OK);
}
}
}