/// <summary>
        /// Perform rendering before child elements are rendered.
        /// </summary>
        /// <param name="context">Rendering context.</param>
        public override void RenderBefore(RenderContext context)
        {
            if (Draw)
            {
                RectangleF rectF = new RectangleF(ClientLocation.X, ClientLocation.Y - 0.5f, ClientWidth, ClientHeight + 1);
                using (LinearGradientBrush sepBrush = new LinearGradientBrush(rectF, Color.Transparent, _palette.GetRibbonTabSeparatorColor(PaletteState.Normal), 90f))
                {
                    sepBrush.Blend = _fadeBlend;

                    switch (_palette.GetRibbonShape())
                    {
                    default:
                    case PaletteRibbonShape.Office2007:
                    case PaletteRibbonShape.Office2013:
                        context.Graphics.FillRectangle(sepBrush, ClientLocation.X + 2, ClientLocation.Y, 1, ClientHeight - 1);
                        break;

                    case PaletteRibbonShape.Office365:
                        context.Graphics.FillRectangle(sepBrush, ClientLocation.X + 2, ClientLocation.Y, 1, ClientHeight - 1);
                        break;

                    case PaletteRibbonShape.Office2010:
                        context.Graphics.FillRectangle(sepBrush, ClientLocation.X + 1, ClientLocation.Y, 1, ClientHeight - 1);

                        using (LinearGradientBrush sepLightBrush = new LinearGradientBrush(rectF, Color.Transparent, _lighten1, 90f))
                        {
                            context.Graphics.FillRectangle(sepLightBrush, ClientLocation.X + 2, ClientLocation.Y, 1, ClientHeight - 1);
                        }
                        break;
                    }
                }
            }
        }
 /// <summary>
 /// Gets the ribbon shape.
 /// </summary>
 /// <returns>Color value.</returns>
 public PaletteRibbonShape GetRibbonShape()
 {
     if (RibbonShape != PaletteRibbonShape.Inherit)
     {
         return(RibbonShape);
     }
     else
     {
         return(_inherit.GetRibbonShape());
     }
 }