System.Windows.Forms.ContainerControl.Validate Method

Verifies the value of the control losing focus by causing the Control.Validating and Control.Validated events to occur, in that order.

Syntax

public bool Validate ()

Returns

true if validation is successful; otherwise, false. If called from the Control.Validating or Control.Validated event handlers, this method will always return false.

Remarks

The erload:System.Windows.Forms.ContainerControl.Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version always performs validation, regardless of the value of the ContainerControl.AutoValidate property of the control's parent. Therefore use it to unconditionally force validation.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0