protected override void OnPaint(PaintEventArgs e) { if (Document != null && Width > 0 && Height > 0) { Painter.RenderAll(e.Graphics); } }