Exemplo n.º 1
0
        /// <summary>
        /// Applies orange color scheme to background and title.
        /// </summary>
        /// <param name="b">Reference to object</param>
        public static void ApplyOrangeColorScheme(RibbonBar b)
        {
            b.BackgroundStyle.Reset();
            b.BackgroundMouseOverStyle.Reset();
            b.TitleStyle.Reset();
            b.TitleStyleMouseOver.Reset();

            TypeDescriptor.GetProperties(b.BackgroundStyle)["BackColor"].SetValue(b.BackgroundStyle, ColorScheme.GetColor("CFD5E2"));
            TypeDescriptor.GetProperties(b.BackgroundStyle)["BackColor2"].SetValue(b.BackgroundStyle, ColorScheme.GetColor("C2C9D9"));
            TypeDescriptor.GetProperties(b.BackgroundStyle)["BackColorGradientAngle"].SetValue(b.BackgroundStyle, 90);

            TypeDescriptor.GetProperties(b.TitleStyle)["BackColor"].SetValue(b.TitleStyle, ColorScheme.GetColor("CBA950"));
            TypeDescriptor.GetProperties(b.TitleStyle)["BackColor2"].SetValue(b.TitleStyle, ColorScheme.GetColor("FED665"));
            TypeDescriptor.GetProperties(b.TitleStyle)["BackColorGradientAngle"].SetValue(b.TitleStyle, 90);
            TypeDescriptor.GetProperties(b.TitleStyle)["TextColor"].SetValue(b.TitleStyle, Color.White);
            TypeDescriptor.GetProperties(b.TitleStyle)["PaddingTop"].SetValue(b.TitleStyle, 3);
            TypeDescriptor.GetProperties(b.TitleStyle)["PaddingBottom"].SetValue(b.TitleStyle, 2);
            TypeDescriptor.GetProperties(b.TitleStyle)["PaddingLeft"].SetValue(b.TitleStyle, 2);
            TypeDescriptor.GetProperties(b.TitleStyle)["PaddingRight"].SetValue(b.TitleStyle, 2);
            TypeDescriptor.GetProperties(b.TitleStyle)["TextShadowColor"].SetValue(b.TitleStyle, Color.Black);
            TypeDescriptor.GetProperties(b.TitleStyle)["TextShadowOffset"].SetValue(b.TitleStyle, new Point(1, 1));
            TypeDescriptor.GetProperties(b.TitleStyle)["Border"].SetValue(b.TitleStyle, eStyleBorderType.None);

            b.Invalidate();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Apply Office 2003 color scheme to background and title.
        /// </summary>
        /// <param name="b">Reference to object</param>
        public static void ApplyOffice2003ColorScheme(RibbonBar b)
        {


            b.Invalidate();
        }
Exemplo n.º 3
0
        //internal static void ApplyOffice2007ColorScheme(Ribbon.QatToolbar qat)
        //{
        //    Rendering.Office2007ColorTable ct = null;
        //    Rendering.Office2007Renderer rn = Rendering.GlobalManager.Renderer as Rendering.Office2007Renderer;
        //    if (rn != null)
        //        ct = rn.ColorTable;
        //    else
        //        ct = new Rendering.Office2007ColorTable();

        //    Rendering.Office2007QuickAccessToolbarStateColorTable qatColors = ct.QuickAccessToolbar.Standalone;
        //    qat.BackColor = Color.Transparent;
        //    qat.BackgroundStyle.BackColor = qatColors.BottomBackground.Start;
        //    qat.BackgroundStyle.BackColor2 = qatColors.BottomBackground.End;
        //    qat.BackgroundStyle.BackColorGradientAngle = qatColors.BottomBackground.GradientAngle;
        //    qat.BackgroundStyle.Border = eStyleBorderType.Etched;
        //    qat.BackgroundStyle.BorderWidth = 1;
        //    qat.BackgroundStyle.CornerType = eCornerType.Rounded;
        //    qat.BackgroundStyle.CornerDiameter = 2;
        //    qat.BackgroundStyle.BorderColor = qatColors.OutterBorderColor;
        //    qat.BackgroundStyle.BorderColorLight = qatColors.InnerBorderColor;
        //}

        /// <summary>
        /// Applies specified visual style to the RibbonBar control.
        /// </summary>
        /// <param name="bar">RibbonBar control to set the style on.</param>
        /// <param name="style">Visual style to apply.</param>
        public static void SetRibbonBarStyle(RibbonBar bar, eDotNetBarStyle style)
        {
            bar.BackgroundStyle.Reset();
            bar.BackgroundMouseOverStyle.Reset();
            bar.TitleStyle.Reset();
            bar.TitleStyleMouseOver.Reset();
            bar.Style = style;
            bar.Invalidate();
        }
Exemplo n.º 4
0
 /// <summary>
 /// Applies Office 2007 Luna blue color scheme to the Ribbon Bar.
 /// </summary>
 /// <param name="b">Reference to object.</param>
 public static void ApplyOffice2007ColorScheme(RibbonBar b)
 {
     //Rendering.Office2007ColorTable c = GetOffice2007ColorTable(b);
     //ApplyRibbonBarOffice2007ElementStyle(b.BackgroundStyle, b.BackgroundMouseOverStyle, b.TitleStyle, b.TitleStyleMouseOver, c);
     b.Invalidate();
 }