Silverlight 4relativeSourceFindAncestor绑定
Silverlight 4中会有RelativeSource FindAncestor、AncestorType...吗?
Will there be RelativeSource FindAncestor, AncestorType... in Silverlight 4?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在Silverlight 4中,
Binding
的RelativeSource
属性仍然只支持“Self”和“TemplatedParent”,这方面与Silverlight 3相比没有变化。In Silverlight 4 the
RelativeSource
property ofBinding
still only supports "Self" and "TemplatedParent", there is no change from Silverlight 3 in this area.RelativeSource AncestorType
Silverlight 5 支持,现已推出。RelativeSource AncestorType
is supported in Silverlight 5, which is available now.也许您可以将 XMAL 中的 ViewModel 实例化为静态资源,然后将其引用为绑定中的源。
Perhaps you could instantiate the ViewModel in the XMAL as a static resource then reference that as the source in your binding.
这可能会有所帮助:
http:// /blog.thekieners.com/2010/09/08/relativesource-binding-with-findancestor-mode-in-silverlight/
This may help:
http://blog.thekieners.com/2010/09/08/relativesource-binding-with-findancestor-mode-in-silverlight/