c# - How can I selectively validate a form in WPF? -
I am currently using the verification code listed in an application. I want to validate a page I select. Its meaning is from: I have a form that is associated with verification rules. I also have a checkbox that checks the value of several byte text boxes, disables it and clears whether I can set these properties to these textboxes, which the verification engine says to say it. Do not include to validate? Perhaps
Perhaps if you have written an attachment attributable to your Validator class, and this is the first in your IsValid method The thing is checked for.
Static class vauditor {public static readonly dependency property drop evaluation property = dependency property. Registrar unbreakable ("", typef (bull), typef (validator), new UIPpropy metadata (false)); Public Stable Bull GetSkipValidation (Dependent Object OBJ) {Return (obsolet) obj.GetValue (SkipValidationProperty); } Public static zero SetSkipValidation (dependency object obj, bool value) {obj.SetValue (SkipValidationProperty, value); } Public Static Balls ISIIDID (DependentObject Parent) {if (Valuerator Gatescope Validity (Original)) is true; // the rest of the verification code}} then you can do something simple:
& lt; StackPainel & gt; & Lt; Text box x: name = "txt" local: validator. Skip Validation = "{Binding ishiched, ElementName = CBX}" /> & Lt; Checkbox X: Name = "CBX" & gt; Leave valid? & Lt; / Checkbox & gt; & Lt; / StackPanel & gt;
Comments
Post a Comment