ContainerControl.Validate Methode
Definition
Überprüft den Wert des Steuerelements, das den Fokus verliert, indem das Validating-Ereignis und das Validated-Ereignis in dieser Reihenfolge ausgelöst werden.Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order.
Überlädt
Validate() |
Überprüft den Wert des Steuerelements, das den Fokus verliert, indem das Validating-Ereignis und das Validated-Ereignis in dieser Reihenfolge ausgelöst werden.Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order. |
Validate(Boolean) |
Überprüft den Wert des Steuerelements, das den Fokus verliert. Dies hängt bedingt davon ab, ob die automatische Validierung aktiviert ist.Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on. |
Validate()
Überprüft den Wert des Steuerelements, das den Fokus verliert, indem das Validating-Ereignis und das Validated-Ereignis in dieser Reihenfolge ausgelöst werden.Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order.
public:
bool Validate();
public bool Validate ();
member this.Validate : unit -> bool
Public Function Validate () As Boolean
Gibt zurück
true
wenn die Validierung erfolgreich ist; andernfalls false
.true
if validation is successful; otherwise, false
. Wenn sie vom Validating-Ereignishandler oder vom Validated-Ereignishandler aufgerufen wird, gibt diese Methode immer false
zurück.If called from the Validating or Validated event handlers, this method will always return false
.
Hinweise
Die Validate -Methode überprüft das letzte untergeordnete Steuerelement, das nicht überprüft wird, und seine Vorgänger über dem aktuellen Container Steuerelement.The Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. Diese überladene Version führt immer eine Validierung durch, unabhängig vom AutoValidate Wert der-Eigenschaft des übergeordneten Elements des Steuer Elements.This overloaded version always performs validation, regardless of the value of the AutoValidate property of the control's parent. Verwenden Sie diese daher, um die Validierung bedingungslos zu erzwingen.Therefore use it to unconditionally force validation.
Siehe auch
Validate(Boolean)
Überprüft den Wert des Steuerelements, das den Fokus verliert. Dies hängt bedingt davon ab, ob die automatische Validierung aktiviert ist.Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on.
public:
bool Validate(bool checkAutoValidate);
public bool Validate (bool checkAutoValidate);
member this.Validate : bool -> bool
Public Function Validate (checkAutoValidate As Boolean) As Boolean
Parameter
- checkAutoValidate
- Boolean
Wenn true
, wird mithilfe des Werts der AutoValidate-Eigenschaft bestimmt, ob die Validierung ausgeführt werden soll. Wenn false
, wird die Validierung bedingungslos ausgeführt.If true
, the value of the AutoValidate property is used to determine if validation should be performed; if false
, validation is unconditionally performed.
Gibt zurück
true
wenn die Validierung erfolgreich ist; andernfalls false
.true
if validation is successful; otherwise, false
. Wenn sie vom Validating-Ereignishandler oder vom Validated-Ereignishandler aufgerufen wird, gibt diese Methode immer false
zurück.If called from the Validating or Validated event handlers, this method will always return false
.
Hinweise
Die Validate -Methode überprüft das letzte untergeordnete Steuerelement, das nicht überprüft wird, und seine Vorgänger über dem aktuellen Container Steuerelement.The Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. Diese überladene Version führt die Validierung auf der Grundlage der folgenden Bedingungen aus:This overloaded version performs validation based on the following conditions:
Wenn der
checkAutoValidate
-Parametertrue
ist, erfolgt die Validierung immer für untergeordnete Steuerelemente, die nicht überprüft werden.If thecheckAutoValidate
parameter istrue
, validation always occurs for child controls that are not validated.Wenn der
checkAutoValidate
-Parameterfalse
ist, erfolgt die Validierung nur AutoValidate , wenn die-Eigenschaft des übergeordneten Steuer Elements aktiviert ist.If thecheckAutoValidate
parameter isfalse
, validation occurs only if the AutoValidate property of the control's parent is enabled.