private void bgPanel_MouseLeave(object sender, EventArgs e) { if (_addingControl) { _addingControl = false; bgPanel.Invalidate(); } }