Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
510
DataAnnotation DisplayAttribute compatibility
posted

Hi,

Is the Name property of DisplayAttribute supported?

Example:

  public class Test
  {
    [Display(AutoGenerateField = false)]
    public long Id { get; set; }

    [Display(Name = "Description")]
    public string Desc { get; set; }
  }

Below is a test with a XamGrid (2010.2) on the top and a normal silverlight DataGrid on the bottom.

The header text is the property name for the xamGrid and the value given by the attribute for the normal grid.

Am I missing something?

Regards,

Julien