public override void RecalcSize(Graphics gfx) { Width = 0; Height = 0; EffectiveWidth = 0; EffectiveHeight = 0; if (CellElement != null) { CellElement.RecalcSize(gfx); CellElement.Width = CellElement.EffectiveWidth; CellElement.Height = CellElement.EffectiveHeight; if (CellElement.ElementType == ElementTypes.Geometric3D) { GraphicsElementGeometric3D obj3d = (GraphicsElementGeometric3D)CellElement; obj3d.ResetMidpoint(); } if (Width == 0) { Width = CellElement.Width; } if (Height == 0) { Height = CellElement.Height; } } Width += Padding.Left + Padding.Right; Height += Padding.Top + Padding.Bottom; EffectiveWidth = Width; EffectiveHeight = Height; }