private void ControlToValidate_Validating(
object sender,
CancelEventArgs e)
{
// We don't cancel if invalid since we don't want to force
// the focus to remain on ControlToValidate if invalid
e.Cancel = !Validate();
if (e.Cancel)
{
_controlToValidate.BackColor = Color.LightPink;
}
else
{
_controlToValidate.BackColor = Color.White;
}
}