protected override void OnPaint(PaintEventArgs e)
{
// Do we have a manager to use for painting?
if (ViewManager != null)
{
// If the control has not been initialized as yet
if (!IsInitialized)
{
// In design mode it does not call BeginInit/EndInit
BeginInit();
EndInit();
// Must perform a layout of panels for painting
PerformLayout();
}
}
base.OnPaint(e);
}