Combining DataAnnotations and IDataErrorInfo for WPF
问题 I am writing a WPF application and I want to use Data Annotations to specify things like Required Fields, Range , etc. My ViewModel classes use the regular INotifyPropertyChanged interface and I can validate the entire object easily enough using the C# 4 Validator , but I would also like the fields to highlight red if they do not validate properly. I found this blog post here (http://blogs.microsoft.co.il/blogs/tomershamam/archive/2010/10/28/wpf-data-validation-using-net-data-annotations-part