示例#1
0
 public static void ApplyFormStyle(C1.Win.C1Ribbon.C1RibbonForm fx, string visualStyle)
 {
     // apply visual style for this control
     switch (visualStyle)
     {
         case VisualStyles.VISUAL_STYLE_BLUE:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Office2007Blue;
             fx.BackColor = System.Drawing.Color.FromArgb(234, 242, 251);
             break;
         case VisualStyles.VISUAL_STYLE_SILVER:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Office2007Silver;
             fx.BackColor = System.Drawing.Color.FromArgb(232, 234, 236);
             break;
         case VisualStyles.VISUAL_STYLE_BLACK:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Office2007Black;
             fx.BackColor = System.Drawing.Color.FromArgb(232, 232, 232);
             break;
         case VisualStyles.VISUAL_STYLE_BLUE10:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Office2010Blue;
             fx.BackColor = System.Drawing.Color.FromArgb(234, 242, 255);
             break;
         case VisualStyles.VISUAL_STYLE_SILVER10:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Office2010Silver;
             fx.BackColor = System.Drawing.Color.FromArgb(232, 234, 236);
             break;
         case VisualStyles.VISUAL_STYLE_BLACK10:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Office2010Black;
             fx.BackColor = System.Drawing.Color.FromArgb(232, 232, 232);
             break;
         case VisualStyles.VISUAL_STYLE_WINDOWS7:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Windows7;
             fx.BackColor = System.Drawing.Color.FromArgb(234, 242, 255);
             break;
         default:
             fx.VisualStyle = C1.Win.C1Ribbon.VisualStyle.Windows7;
             fx.BackColor = System.Drawing.Color.FromArgb(234, 242, 255);
             break;
     }
 }
示例#2
0
 public static void ApplyFormStyle(C1.Win.C1Ribbon.C1RibbonForm fx)
 {
     ApplyFormStyle(fx, visualStyle);
 }