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); }
/// <summary> /// Minimum height of the aFrame /// </summary> /// <returns></returns> public double MinHeight() { if (Surface != null) { return(FrameThickness * 2 + Surface.MinHeight()); } else { return(FrameThickness * 2); } }
public float MinY() { Surface previous = PreviousSurface(); if (previous != null) { return(previous.Y + previous.MinHeight()); } return(-1); }