views:

72

answers:

1

I'm having a problem with data annotations and the automatic tool tips on my DataForm fields. The objects bound to the DataForm have been decorated with the Display and Description attributes e.g.

[Display(Name = "Email Address:", Description="We do not sell your information!")]
public string EmailAddress { get; set; }

The expected tooltips are not appearing on the DataForm next to the relevant fields. In the example given I would expect to see an info icon next to the EmailAddress field with a pop up tooltip set to the Description value ("We do not sell your information!").

Has anyone else had a similar problem? I am using Silverlight 4 and RIA Services.

A: 

Make sure you have "System.ComponentModel.DataAnnotations" in your References. Also the DataForm must be editable (and in edit mode) for the ToolTips to show.

Bob