I have a page where a few textboxes cannot be empty before clicking a Save button.
<TextBox... <TextBox.Text> <Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged"> <Binding.ValidationRules> <local:StringRequiredValidationRule /> </Binding.ValidationRules> </Binding> </TextBox.Text>
My rule works, I have a red border around my textbox until I enter a value. I now want to add this validation rule to my other text boxes.
How do I disable the Save button until the page has no validation errors? I'm not sure what to check.
Here is the complete sample what you need.
http://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/
https://skydrive.live.com/?cid=2c6600f1c1d5e3be&id=2C6600F1C1D5E3BE%21203
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With