ComponentFactory.Krypton.Ribbon.ViewDrawRibbonAppMenu.RenderAfter C# (CSharp) Method

RenderAfter() public method

Perform rendering after child elements are rendered.
public RenderAfter ( RenderContext renderContext ) : void
renderContext ComponentFactory.Krypton.Toolkit.RenderContext Rendering context.
return void
        public override void RenderAfter(RenderContext renderContext)
        {
            base.RenderAfter(renderContext);

            // Convert our rectangle to the screen
            Rectangle screenRect = renderContext.TopControl.RectangleToScreen(renderContext.TopControl.ClientRectangle);

            // If the fixed rectangle is in our showing area and at the top
            if ((screenRect.Contains(_fixedScreenRect)) && (screenRect.Y == _fixedScreenRect.Y))
            {
                // Position the element appropriately
                using (ViewLayoutContext layoutContext = new ViewLayoutContext(renderContext.Control, renderContext.Renderer))
                {
                    layoutContext.DisplayRectangle = renderContext.TopControl.RectangleToClient(_fixedScreenRect);
                    _fixedElement.Layout(layoutContext);
                }

                // Now draw
                _fixedElement.Render(renderContext);
            }
        }