Silveright 用户控件验证

发布于 2025-01-07 08:39:52 字数 120 浏览 2 评论 0原文

我在我的 silverlight 页面之一中遵循 MVVM 模式。 我正在尝试为我的用户控件之一添加验证,该验证应该类似于与 Silverlight 本机控件一起使用的验证。我可以这样做吗?我需要添加特殊代码来处理这个问题吗?

I follow MVVM pattern in one of my silverlight pages.
I am trying to add validations for one of my usercontrols which should look like those which work with the Silverlight native controls. Is it possible for me to do that? Do I need to add special code to handle this?

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

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

发布评论

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

评论(2

千纸鹤带着心事 2025-01-14 08:39:53

确保您的 ViewModel 实现了 IDataErrorInfo,然后您可以将它们连接到控件。

您可以在这里查看一篇好文章:
http://www.arrangeactassert。 com/using-idataerrorinfo-for-validation-in-mvvm-with-silverlight-and-wpf/

Make sure your ViewModel implements IDataErrorInfo and then you can hook them up to the controls.

You can look at a good article here:
http://www.arrangeactassert.com/using-idataerrorinfo-for-validation-in-mvvm-with-silverlight-and-wpf/

若水般的淡然安静女子 2025-01-14 08:39:52

如果您可以发布您的代码,那么我也许可以提供帮助。但根据您的问题,我认为 Silverlight 有可用的用户验证控件,您只需拖放即可使用。
它们在大多数新 IDE 中都可用。

if you could post your code then i might be able to help. But as per your question i think there are available user-validation controls for Silverlight that you can just drag and drop and then use.
They are available in most of the new IDE's.

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