ComponentFactory.Krypton.Ribbon.ViewDrawRibbonAppMenuRecentDec.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)
        {
            Debug.Assert(context != null);

            // Validate incoming reference
            if (context == null) throw new ArgumentNullException("context");

            // Enforce the maximum width value
            Size preferredSize = base.GetPreferredSize(context);
            preferredSize.Width = Math.Min(_maxWidth, preferredSize.Width);
            return preferredSize;
        }