Completed
Last Updated: 27 Oct 2015 12:38 by ADMIN
ADMIN
Peter
Created on: 21 Jun 2012 04:01
Category: UI Framework
Type: Bug Report
0
FIX. RadRibbonBar - ApplicationButton and QuickStartToolbar layout does not look good when the user changes the theme at runtime
ApplicationButton and QuickStartToolbar layout do not look good when user changed the theme in runtime.
Issue can be reproduced with Office2010Silver, Deser, HighContrastBlack and Windows7 themes.

Workaround:
 call recursively the UpdateLayout method for all RadControls in the form:

ThemeResolutionService.ApplicationThemeName = item.Text;
    this.RefreshAll();
    m_strThemeName = item.Text;
    SaveThemeName();
...
}
 
private void RefreshAll()
{
    foreach(Control control in this.Controls)
    {
        RefreshAllControls(control);
    }
}
 
void RefreshAllControls(Control ctrl)
{
    foreach (Control control in ctrl.Controls)
    {
        RadControl radControl = control as RadControl;
        if (radControl != null)
        {
            radControl.RootElement.InvalidateMeasure(true);
            radControl.RootElement.UpdateLayout();                   
        }
        RefreshAllControls(control);
    }
}
0 comments