Silverlight 3 DataAnnotations in localized resources from database RRS feed

  • Question

  • Hello,

     I have an application that has the localized resources downloaded from the DB, those resources are stored in a Key, Value dictionary and are accessed using a class that implements the IValueConverter so the localization is done in the XAML or in the code with no problem.

    However, I would like to add DataAnnotations to the properties of my ViewModel so validation can be done using Attributes.

    Note that it is no a resource file ( resx ) file so I cannot use ErrorMessageResourceType andErrorMessageResourceName attributes.

    Any suggestion ? Is it possible to use DataAnnotations in this case ?

     Thank you.

    Friday, March 26, 2010 1:24 PM


  • Hi,

    The types in Data Annotations namespaces such as DisplayAttribute, LocalizableString are all sealed or internal, it doesn't expose extension point. I'm afraid that what you need cannot be achieved by customizing DataAnnotation.


    Tuesday, March 30, 2010 3:07 AM