public override SizeF GetBackgroundExtent(MeasureHelper measure, SizeF contentSize) { if (Application.RenderWithVisualStyles && VisualStyleRenderer.IsElementDefined(GetBackgroundElement())) { Rectangle content = new Rectangle(new Point(0, 0), Size.Ceiling(contentSize)); contentSize = GetRenderer(GetBackgroundElement()).GetBackgroundExtent(measure.Graphics, content).Size; } else { contentSize = mStandardHeader.GetBackgroundExtent(measure, contentSize); } return(base.GetBackgroundExtent(measure, contentSize)); }
public override SizeF GetBackgroundExtent(MeasureHelper measure, SizeF contentSize) { contentSize = mBackground.GetBackgroundExtent(measure, contentSize); return(base.GetBackgroundExtent(measure, contentSize)); }