ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupsBorder.Layout C# (CSharp) Method

Layout() public method

Perform a layout of the elements.
public Layout ( ViewLayoutContext context ) : void
context ComponentFactory.Krypton.Toolkit.ViewLayoutContext Layout context.
return void
        public override void Layout(ViewLayoutContext context)
        {
            Debug.Assert(context != null);

            // We take on all the available display area
            ClientRectangle = context.DisplayRectangle;

            // Do we need to add on our own border size
            if (!_borderOutside)
            {
                // Reduce the display rectangle by the border
                context.DisplayRectangle = CommonHelper.ApplyPadding(Orientation.Horizontal, context.DisplayRectangle, BorderPadding);
            }

            // Let children be layed out inside our space
            base.Layout(context);

            // Put back the original display value now we have finished
            context.DisplayRectangle = ClientRectangle;
        }