protected override void OnPaint(PaintEventArgs e)
{
if (Parent == null)
return;
// Draw the control we're overlaying. On Linux it might not show properly
// otherwise, especially since it is disabled.
using (var behind = new Bitmap(Parent.ClientSize.Width, Parent.ClientSize.Height))
{
_overlayedControl.DrawToBitmap(behind, _overlayedControl.Bounds);
e.Graphics.DrawImage(behind, 0, 0);
}
}