ComponentFactory.Krypton.Ribbon.ViewDrawRibbonAppButton.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;
            _clipRect = ClientRectangle;

            // Update to reflect full size of actual button
            if (_bottomHalf)
            {
                Rectangle client = ClientRectangle;
                client.Y = client.Y - (SIZE_FULL.Height - SIZE_BOTTOM.Height);
                ClientRectangle = client;
            }

            ClientHeight = SIZE_FULL.Height;
        }