.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
Post a Comment