ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGalleryButton.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;

            // Dispose of any current memnto
            if (_mementoContent != null)
            {
                _mementoContent.Dispose();
                _mementoContent = null;
            }

            // Create new memento based on the new size and image
            _mementoContent = context.Renderer.RenderStandardContent.LayoutContent(context, ClientRectangle,
                                                                                   _paletteContent, this,
                                                                                   VisualOrientation.Top,
                                                                                   State, false);
        }