用于 WPF 绑定的具有 INotifyPropertyChanged 和 IDataErrorInfo 的 LINQ to SQL 类

发布于 2024-09-27 13:14:41 字数 112 浏览 15 评论 0原文

我使用 LINQ to SQL 类来访问我的数据库。现在我想使用 LINQ to SQL 类进行 WPF 数据绑定和验证。如何将这两个接口实现到我的项目模型中?是否可以自动实现 INotifyProperty?

I use the LINQ to SQL Classes to access to my database. Now I want to use the LINQ to SQL Classes for WPF DataBindings and validation. How do I implement these two interfaces to my projects Model? Is it possible implement INotifyProperty automatically?

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

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

发布评论

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

评论(1

故人的歌 2024-10-04 13:14:41

这将为您提供 INotifyPropertyChanged 部分。

NotifyPropertyWeaver

那么 IDataErrorInfo 可以在基类中完成。

This gets you the INotifyPropertyChanged part.

NotifyPropertyWeaver

Then IDataErrorInfo can be done in a base class.

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