Esempio n. 1
0
        public float MinHeight()
        {
            float MINH = 1;

            if (ChildrenCount == 0)
            {
                return(MINH);
            }

            Surface firstChild = FirstChild();

            if (ChildrenCount == 1)
            {
                if (firstChild != null)
                {
                    MINH = firstChild.MinHeight();
                }
                else
                {
                    PNode nodeChild = GetChild(0);
                    if (nodeChild is Sash)
                    {
                        MINH = ((Sash)nodeChild).MinHeight();
                    }
                }
            }
            else if (Layout == SurfaceLayout.VERTICAL)
            {
                foreach (Surface child in SurfaceChildrenReference)
                {
                    Mullion nextMullion;
                    if ((nextMullion = child.NextMullion()) != null)
                    {
                        MINH += child.Model.Height + nextMullion.Thickness;
                    }
                    else
                    {
                        MINH += child.MinHeight();
                    }
                }
            }
            else
            {
                float minHeight;
                foreach (Surface child in SurfaceChildrenReference)
                {
                    if ((minHeight = child.MinHeight()) > MINH)
                    {
                        MINH = minHeight;
                    }
                }
            }
            return(MINH);
        }
Esempio n. 2
0
 /// <summary>
 /// Minimum height of the aFrame
 /// </summary>
 /// <returns></returns>
 public double MinHeight()
 {
     if (Surface != null)
     {
         return(FrameThickness * 2 + Surface.MinHeight());
     }
     else
     {
         return(FrameThickness * 2);
     }
 }
Esempio n. 3
0
        public float MinY()
        {
            Surface previous = PreviousSurface();

            if (previous != null)
            {
                return(previous.Y + previous.MinHeight());
            }

            return(-1);
        }