private void editorPathTextBox_Validating(object sender, CancelEventArgs e) { var path = editorPathTextBox.Text; if (!string.IsNullOrWhiteSpace(path) && !File.Exists(path)) { if (MessageDisplay.Ask("The specified path does not exist. Do you want to continue anyway?") == DialogResult.Yes) { e.Cancel = true; } } }