void ChangeTheme(ControlCollection cc, string strCssFilePath, string strCssPostfix)
 {
     foreach (Control control in cc)
     {
         ASPxWebControl Webcontrol = control as ASPxWebControl;
         if (Webcontrol != null)
         {
             Webcontrol.CssFilePath = strCssFilePath;
             Webcontrol.CssPostfix  = strCssPostfix;
             ASPxPageControl temp = control as ASPxPageControl;
             if (temp != null)
             {
                 //ASPxPageControl1.TabPages[0].Controls
                 foreach (TabPage tp in temp.TabPages)
                 {
                     ChangeTheme(tp.Controls, strCssFilePath, strCssPostfix);
                 }
             }
             else
             {
                 ASPxPanelBase temp2 = control as ASPxPanelBase;
                 if (temp2 != null)
                 {
                     ChangeTheme(temp2.Controls, strCssFilePath, strCssPostfix);
                 }
             }
         }
     }
 }
Esempio n. 2
0
 public static void PanelApplyTheme(ASPxPanelBase Panel, string theTheme)
 {
     Panel.CssFilePath = "~/App_Themes/Glass/{0}/styles.css";
     Panel.CssPostfix = "Glass";
 }