.net - WPF databinding - set NotifyOnValidationError to true for all bindings with validation rules -


in wpf application, want set notifyonvalidationerror true (the framework defaults false) child controls/bindings if have validationrules attached binding. indeed, nice specify other binding defaults - e.g. validatesondataerrors should true.

for example, in following text box don't want have manually specify notifyonvalidationerror property.

<textbox>     <textbox.text>         <binding path="postalcode"                   validatesondataerrors="true"                   notifyonvalidationerror="true">             <binding.validationrules>                 <rules:postalcoderule />             </binding.validationrules>         </binding>     </textbox.text> </textbox> 

since binding markup extension create custom markup extensions extends binding , sets properties desired defaults.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -