Completed
Last Updated: 11 May 2015 13:48 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 27 May 2014 09:42
Category: Form
Type: Bug Report
0
FIX. RadMessageBox - incorrect style for the OK/Cancel buttons when applying theme for the entire application
To reproduce:
1.Add a RadButton and on its Click event, show a RadMessageBox.
2.Add a RadDropDownList .
3.Drag several themes from the toolbox and drop them onto the form (e.g. Office2010Black, Office2010Blue, TelerikMetro, Windows8)
4.Use the following code:

public Form1()
{
    InitializeComponent();

    this.radDropDownList1.Items.Add("Office2010Black");
    this.radDropDownList1.Items.Add("Office2010Blue");
    this.radDropDownList1.Items.Add("TelerikMetro");
    this.radDropDownList1.Items.Add("Windows8");

    this.radDropDownList1.SelectedIndexChanged += radDropDownList1_SelectedIndexChanged;
    this.radDropDownList1.SelectedItem = this.radDropDownList1.Items[0];
}

private void radDropDownList1_SelectedIndexChanged(object sender,
    Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
    string itemText = this.radDropDownList1.Items[e.Position].Text;           
    ThemeResolutionService.ApplicationThemeName = itemText;
}

private void radButton1_Click(object sender, EventArgs e)
{
    RadMessageBox.Show("Some message", "Confirmation", MessageBoxButtons.OKCancel);
}

When you select a new item from the RadDropDownList, the theme for the entire application is changed. But when you click the button to show a RadMessageBox, the RadMessageBox has incorrect style for its buttons.

Workaround: set the RadMessageBox.ThemeName before showing it:

RadMessageBox.ThemeName = ThemeResolutionService.ApplicationThemeName;
RadMessageBox.Show("Some message", "Confirmation", MessageBoxButtons.OKCancel);
Attached Files:
0 comments