(Print this page)

New article: WPF - Using IDataErrorInfo on a class exposing validation attributes from a MetaData class
Published date: Monday, March 16, 2015
On: Moer and Éric Moreau's web site

Believe me. I searched the web not so long ago to find this information and couldn’t find anything complete. This article will try to document it.

I was using DataAnnotations to validate my classes before saving to Entity Framework 6 and tried to use IDataErrorInfo using the same validation attributes already in place instead of recreating them.

This seem simple but partial classes and the MetadataType attributes add some complexity to the task.

I made the demo so that even if you are not using the MetadataType and partial classes, you can still use this code presented in this article.

You can read this article from http://emoreau.com/Entries/Articles/2015/03/WPF-Using-IDataErrorInfo-on-a-class-exposing-validation-attributes-from-a-MetaData-class.aspx.


(Print this page)