Rather than subclass Panel, it is better to subclass UserControl.