In general, you can get the elements inside the RadMessageBox through the RadMessageBox.Instance static property. Using it lets you customize various elements within the RadMessageBox form.
privatevoidCustomizeMessageBox()
{
// Customizing the title bar font and color
RadMessageBox.Instance.FormElement.TitleBar.Font = new Font("Verdana", 16, FontStyle.Bold);
RadMessageBox.Instance.FormElement.TitleBar.TitlePrimitive.ForeColor = Color.Red;
// Customizing the buttons size
RadMessageBox.Instance.ButtonSize = new Size(100, 40);
foreach (Control control in RadMessageBox.Instance.Controls)
{
// Customizing the message text font and colorif (control is RadLabel)
{
control.Font = new Font("Arial", 12f, FontStyle.Italic);
control.ForeColor = Color.Green;
}
// Customizing the buttons fontif (control is RadButton)
{
control.Font = new Font("Tahoma", 16f, FontStyle.Bold);
}
}
}
Here is the result:
Regards,
Dinko | Tech Support Engineer
Progress Telerik