public Rectangle DimensionTop(bool includeMe) { int width = 0; int height = 0; //Only the top dimension neighbor exists, the value of the caller is considered if (includeMe) { width = Screen.Dimension.Width; height = Screen.Dimension.Height; } if (NeighborTop != null) { var dimensionTop = NeighborTop.DimensionTop(includeMe: true); if (dimensionTop.Width > width) { width = dimensionTop.Width; } height += dimensionTop.Height; } var dimension = new Rectangle(0, 0, width, height); return(dimension); }