Using WPF Validation Rules And The Disabling Of A 'Save' Button
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.
- → Change background of some holiday dates in Calendar control
- → Hiding inherited members
- → How to access a child control's property when it is declared in a ControlTemplate?
- → how to access a child element dynamically in WPF
- → A simpel WPS using MVVM and EF
- → WPF problems refreshing textblock bound to console.stdout
- → View lost when refreshing ObjectDataProvider
- → Refreshing a wpf databinding after object has been updated
- → WPF Frame Source Refreshing the Loaded Page
- → What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application
- → How to display placeholder value in WPF Visual Studio Designer until real value can be loaded
- → Watermark / hint / placeholder text in TextBox?