mvvmlight中的绑定监听器是做什么的

发布于 2024-11-17 22:24:22 字数 66 浏览 4 评论 0原文

我最近一直在做一些 silverlight 并被告知 mvvmlight 中的绑定侦听器会很有帮助。这个类有什么作用?

I have been doing some silverlight recently and was told that the bindinglistener in mvvmlight would be helpful.what does this class do?

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

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

发布评论

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

评论(1

月亮邮递员 2024-11-24 22:24:22

在 Silverlight 3 中,您无法从 DependencyObject 派生,因此无法将 DependencyProperties 添加到任何对象。要解决这个问题,您可以使用 BindingListener 来侦听属性更改,然后通知绑定发生了某些情况。

Silverlight 4 中取消了此限制,因此如果升级到此版本的 Silverlight,则不需要绑定侦听器。

有道理吗?
干杯,
洛朗

In Silverlight 3, you cannot derive from DependencyObject, so you cannot add DependencyProperties to just any object. To work around that, you can use a BindingListener that will listen to property changes and then notify the bindings that something happened.

This limitation was lifted in Silverlight 4 so you don't need the binding listener if you upgrade to this version of Silverlight.

Makes sense?
Cheers,
Laurent

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