Indexing & handling changes

Jan 21, 2009 at 12:52 AM

I've some ideas about using i4o in binding scenarios or with changing collections.

The simpliest one - to create indexing wrapper around CollectionViewSource (for WPF)
or BindingSource (WinForms) as they provides unified way to handle changes.

Another way - to wrap over common interfaces - like IBindingList and INotifyCollectionChanged.

If wrapping & indexing collection will implement these events itself, it could be used as binding source.

And (in future) there could be dynamic filtering collection (works like DataView) - one of most useful things.

P.S. What about using PropertyDescriptors to obtain property values? It's common to use them in binding scenarios (even with DependencyObject).

Jan 24, 2009 at 8:47 PM

Aaron had the same idea about the binding scenerios.

I agree when used in a fast filtering story for UI scenerios, this could be very interesting.

Send in a patch and I'll take a look?

Also, I'm not familiar with PropertyDescriptors. Is this faster reflection. Can you point me to an an example of use?


Jan 26, 2009 at 2:18 AM

No, sorry, I've no time enough to contribute. Just comments, no more:)

I could not say PropertyDescriptors are faster (may be, but not always). They are standard way to access metadata and are used by binding engines or designers. Someone could implement their own property descriptors / type descriptor and override methadata provided. So DataView/DataRowView do to enable binding to their items.

Property descriptor is preferred over reflection because it is abstract way to access data. There could be ReflectionPropertyDescriptor, DataColumnPropertyDescriptor and so on.

I could not find any quick link for you, but you can try to google it :)

Good day!