Пример #1
0
        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));
        }
Пример #2
0
        public override SizeF GetBackgroundExtent(MeasureHelper measure, SizeF contentSize)
        {
            contentSize = mBackground.GetBackgroundExtent(measure, contentSize);

            return(base.GetBackgroundExtent(measure, contentSize));
        }