在目前开展的Im项目中,我没有平原航天中心对我的数据网进行约束。 通常,我将使用一种可观察的Collection<MyObject>
,但现在我可以而且相反,我必须使用一种习俗物体(如可数据但符合习惯逻辑)。
My question is : How can I make a proxy/adapter object that will "translate" every binding operations on items in cells of my datagrid to my custom logic object?
牢记:
- My object is not a Collection, so I don t really have Items.
- The "columns" of the virtual items might change.
- Somewhere in the application I might change one value in that object and that the datagrid must reflect changes
现在,我们正在重新研究从习俗物体中提取数据,以在数据网中显示其数据意见,我们拦截带有事件的编辑指令(即刻),然后在改变电池价值时从零头重载一切。
我在寻找如何实现这一目标的方面,但我发现的情况是:
- IItemProperties interface (Might be interesting to have dynamic columns but I don t have a collection)
- DataSourceProvider class (It appears to be a wrapper for ItemsSource, but I don t see what I have to return in the Data property)
- INotifyPropertyChanged interface (To tell a property changed, but I don t have items or at least items don t have properties)
- ICustomTypeDescriptor interface (Ok but once I returned the properties with GetProperties() how the datagrid will try to modify the inexistent property?)
你可以看到,它混淆了选择一种执行好代理的方法。