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

            // Get the preferred size requested by the children
            Size size =  base.GetPreferredSize(context);

            // Apply the rounding in the appropriate orientation
            if ((Orientation == VisualOrientation.Top) || (Orientation == VisualOrientation.Bottom))
            {
                size.Width += Rounding * 2;
                size.Height += BorderWidth;
            }
            else
            {
                size.Height += Rounding * 2;
                size.Width += BorderWidth;
            }

            return size;
        }