Silverlight 4、RIA 服务和数据注释。工具提示未出现在 DataForm 上

发布于 2024-09-24 19:43:35 字数 372 浏览 1 评论 0原文

我的 DataForm 字段上的数据注释和自动工具提示存在问题。绑定到 DataForm 的对象已用 Display 和 Description 属性进行修饰,例如

[Display(Name = "Email Address:", Description="We do not sell your information!")]
公共字符串电子邮件地址{获取;放; 预期的工具

提示没有出现在相关字段旁边的数据表单上。在给出的示例中,我希望在“电子邮件地址”字段旁边看到一个信息图标,其中弹出工具提示设置为“描述”值(“我们不会出售您的信息!”)。

还有其他人遇到过类似的问题吗?我正在使用 Silverlight 4 和 RIA 服务。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小镇女孩 2024-10-01 19:43:35

确保您的参考文献中有“System.ComponentModel.DataAnnotations”。
此外,数据表单必须可编辑(并且处于编辑模式)才能显示工具提示。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文