private int MeasureHeight_Document() { int height = Math.Max(this.TextFont.Height + DocumentTabGapTop, this.ButtonClose.Height + DocumentButtonGapTop + DocumentButtonGapBottom) + DocumentStripGapBottom + DocumentStripGapTop; return height; }