ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGroupImage.GetPreferredSize C# (CSharp) Method

GetPreferredSize() public method

Discover the preferred size of the element.
public GetPreferredSize ( ViewLayoutContext context ) : Size
context ComponentFactory.Krypton.Toolkit.ViewLayoutContext Layout context.
return System.Drawing.Size
        public override Size GetPreferredSize(ViewLayoutContext context)
        {
            switch (_ribbon.RibbonShape)
            {
                default:
                case PaletteRibbonShape.Office2007:
                    _viewSize = _viewSize_2007;
                    _offsetY = _imageOffsetY_2007;
                    break;
                case PaletteRibbonShape.Office2010:
                    _viewSize = _viewSize_2010;
                    _offsetY = _imageOffsetY_2010;
                    break;
            }

            return _viewSize;
        }