I have a MVVM-based Window with many controls, and my Model implements IDataErrorInfo
.
There is also a SaveCommand
button, which performs validation by analysing Model.Error
property.
The view displays the default red border around controls with errors only when I change the value of a particular control, or when I notify about the change of that property using PropertyChanged.
How can I force View to display all Validation errors even when I didn't touch the controls?
All my validation bindings include ValidatesOnDataErrors=True, NotifyOnValidationError=True
.
I know one solution is to have an aggregate box with all the errors, but I would prefer to display errors on per-control basis.
I don't want to trigger Model.NotifyPropertyChanged
for each bound property from ViewModel.
I use WPF 4.0, not Silverlight, so INotifyDataErrorInfo
won't work.