How to custimize RadMessageBox ?

1 Answer 11 Views
MessageBox
Top achievements
Rank 1
Iron
Iron
Iron
asked on 29 Dec 2025, 05:55 AM

i want to custimize RadMessageBox  

example  :  set the TitleBar.Font  BackColor

set  radLabel1  font and backcolor 

set button 's font and button's  szie ....

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 30 Dec 2025, 09:35 AM

Hello 林 暉凱,

Thank you for reaching out to us.

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.

private void CustomizeMessageBox()
{
    // 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 color
        if (control is RadLabel)
        {
            control.Font = new Font("Arial", 12f, FontStyle.Italic);
            control.ForeColor = Color.Green;
        }

        // Customizing the buttons font
        if (control is RadButton)
        {
            control.Font = new Font("Tahoma", 16f, FontStyle.Bold);         
        }
    }
}

Here is the result:

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
MessageBox
Asked by
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or