/// <summary> /// Calculate the total area used by the backgound and the content, adding the background area to the content area. /// </summary> /// <returns></returns> public override SizeF GetBackgroundExtent(MeasureHelper measure, SizeF contentSize) { SizeF extend = base.GetBackgroundExtent(measure, contentSize); extend = mBorder.GetExtent(contentSize); return(extend); }
public override System.Drawing.SizeF GetExtent(System.Drawing.SizeF contentSize) { if (BorderStyle == BorderStyle.System) { return(mEquivalentPadding.GetExtent(contentSize)); } else { return(contentSize); } }