tags:

views:

229

answers:

2

I'm starting to dip my toe into WPF, and I would like to have the collections in my application work with as an ItemSource. I tried implementing INotifyCollectionChanged. I'm ok with that except that then I have to reference WindowsBase.dll in about 15 dll's.

Is there another interface that WPF can use for binding that I might already have referenced?

+4  A: 

A good portion of WPF exists in WindowsBase.dll. There isn't much you can do with WPF without it ;-)

You may want to look into ObservableCollection(T). Again, though, that class is defined in WindowsBase.dll.

unforgiven3
It turns out there is an alternate interface called IBindingList. Based on the link it looks like a whole lot more work than just referencing WindowsBase.http://www.wpfmentor.com/2008/12/observable-collections-independent-of.html
Jake Pearson
Wowwww... that is a ton of work for IBindingList. It makes sense though in their case, since they wanted to keep their business logic away from WPF... but still, wow. haha. Good link!
unforgiven3
A: 

Use an ObservableCollection<> for your ItemsSource; it fires the events for you.

geofftnz