/// <summary> /// Perform rendering before child elements are rendered. /// </summary> /// <param name="context">Rendering context.</param> public override void RenderBefore(RenderContext context) { using Pen darkPen = new(_palette.GetRibbonMinimizeBarDark(PaletteState.Normal)), lightPen = new(_palette.GetRibbonMinimizeBarLight(PaletteState.Normal)); context.Graphics.DrawLine(darkPen, ClientRectangle.Left, ClientRectangle.Bottom - 2, ClientRectangle.Right - 1, ClientRectangle.Bottom - 2); context.Graphics.DrawLine(lightPen, ClientRectangle.Left, ClientRectangle.Bottom - 1, ClientRectangle.Right - 1, ClientRectangle.Bottom - 1); }
/// <summary> /// Gets the color for the ribbon minimize bar dark. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public Color GetRibbonMinimizeBarDark(PaletteState state) { if (MinimizeBarDarkColor != Color.Empty) { return(MinimizeBarDarkColor); } else { return(_inherit.GetRibbonMinimizeBarDark(state)); } }
/// <summary> /// Gets the color for the minimize bar dark. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetRibbonMinimizeBarDark(PaletteState state) { IPaletteRibbonGeneral inherit = GetInherit(state); if (inherit != null) { return(inherit.GetRibbonMinimizeBarDark(state)); } else { return(Target.GetRibbonMinimizeBarDark(state)); } }
/// <summary> /// Gets the color for the minimize bar dark. /// </summary> /// <param name="state">Palette value should be applicable to this state.</param> /// <returns>Color value.</returns> public override Color GetRibbonMinimizeBarDark(PaletteState state) { IPaletteRibbonGeneral inherit = GetInherit(state); return(inherit?.GetRibbonMinimizeBarDark(state) ?? Target.GetRibbonMinimizeBarDark(state)); }