Form.ValidateChildren 方法

定义

验证窗体中所有可选择的子控件。Validates all selectable child controls in the form.

重载

ValidateChildren()

使控件内支持验证的所有子控件都对其数据进行验证。Causes all of the child controls within a control that support validation to validate their data.

ValidateChildren(ValidationConstraints)

使控件内支持验证的所有子控件都对其数据进行验证。Causes all of the child controls within a control that support validation to validate their data.

ValidateChildren()

使控件内支持验证的所有子控件都对其数据进行验证。Causes all of the child controls within a control that support validation to validate their data.

public:
 override bool ValidateChildren();
[System.ComponentModel.Browsable(true)]
public override bool ValidateChildren ();
override this.ValidateChildren : unit -> bool
Public Overrides Function ValidateChildren () As Boolean

返回

如果成功验证所有子级,则为 true;否则为 falsetrue if all of the children validated successfully; otherwise, false. 如果是从 ValidatingValidated 事件处理程序调用的,则该方法将始终返回 falseIf called from the Validating or Validated event handlers, this method will always return false.

属性

另请参阅

ValidateChildren(ValidationConstraints)

使控件内支持验证的所有子控件都对其数据进行验证。Causes all of the child controls within a control that support validation to validate their data.

public:
 override bool ValidateChildren(System::Windows::Forms::ValidationConstraints validationConstraints);
[System.ComponentModel.Browsable(true)]
public override bool ValidateChildren (System.Windows.Forms.ValidationConstraints validationConstraints);
override this.ValidateChildren : System.Windows.Forms.ValidationConstraints -> bool

参数

validationConstraints
ValidationConstraints

添加对哪些控件可以引发其 Validating 事件的限制。Places restrictions on which controls have their Validating event raised.

返回

如果成功验证所有子级,则为 true;否则为 falsetrue if all of the children validated successfully; otherwise, false. 如果是从 ValidatingValidated 事件处理程序调用的,则该方法将始终返回 falseIf called from the Validating or Validated event handlers, this method will always return false.

属性

另请参阅

适用于