数据绑定属性POCO [英] Data Binding POCO Properties

查看:248
本文介绍了数据绑定属性POCO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何数据绑定,允许的任意两个CLR属性的实现 INotifyPropertyChanged的和<$ C $之间的绑定框架(BCL或其他方式) C> INotifyCollectionChanged ?这似乎是它应该是可以做到这样的事情:

Are there any data binding frameworks (BCL or otherwise) that allow binding between any two CLR properties that implement INotifyPropertyChanged and INotifyCollectionChanged? It seems to be it should be possible to do something like this:

var binding = new Binding();
binding.Source = someSourceObject;
binding.SourcePath = "Customer.Name";
binding.Target = someTargetObject;
binding.TargetPath = "Client.Name";
BindingManager.Bind(binding);



其中, someSourceObject someTargetObject 只是波苏斯实现 INotifyPropertyChanged的。不过,我不知道这方面的任何BCL的支持,我不知道是否有允许这种现有框架

Where someSourceObject and someTargetObject are just POCOs that implement INotifyPropertyChanged. However, I am unaware of any BCL support for this, and am not sure if there are existing frameworks that permit this.

更新:给定没有现有的库可用,我采取它在我写我自己。正是在这里使用

UPDATE: Given that there is no existing library available, I have taken it upon myself to write my own. It is available here.

感谢

推荐答案

我写桁架以填补这一空白

这篇关于数据绑定属性POCO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆