If I have user control, in which I override the OnPaint() to display custom graphics. Why does this not show when viewing the control in the design mode of visual studio?
The user control will appear empty when viewed in design mode. However if the control is added to a form, which is viewed in design mode it will appear black.
public partial class MyUserControl : UserControl
{
public MyUserControl()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.Clear(Color.Black);
base.OnPaint(e);
}
}
Is there anything I can do to make this show up when viewing the control in design mode?