数据绑定属性POCO
是否有任何数据绑定,允许的任意两个CLR属性的实现 INotifyPropertyChanged的
和 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.
感谢