ComponentFactory.Krypton.Ribbon.ViewLayoutRibbonGroupsArea.GetPreferredSize C# (CSharp) Метод

GetPreferredSize() публичный Метод

Discover the preferred size of the element.
public GetPreferredSize ( ViewLayoutContext context ) : Size
context ComponentFactory.Krypton.Toolkit.ViewLayoutContext Layout context.
Результат System.Drawing.Size
        public override Size GetPreferredSize(ViewLayoutContext context)
        {
            // Get the preferred size of the contained content
            Size preferredSize = new Size(0, _ribbon.CalculatedValues.GroupsHeight);

            // Add on the padding we need around edges
            if (_ribbon.RealMinimizedMode)
                return new Size(preferredSize.Width + _preferredMinimizedPadding.Horizontal,
                                preferredSize.Height + _preferredMinimizedPadding.Vertical);
            else
                return new Size(preferredSize.Width + _preferredNormalPadding.Horizontal,
                                preferredSize.Height + _preferredNormalPadding.Vertical);
        }