protected override void MeasureBorder(SizeF totalSize) { const float realHeaderInset = HEADER_INSET_LINE + HEADER_INSET_SPACE; float borderInsetX = GetBorderCornerInsetX(); SizeF headerSize = new SizeF(totalSize.Width - (borderInsetX + realHeaderInset) * 2, totalSize.Height); _headerLabel.Measure(ref headerSize); base.MeasureBorder(totalSize); }