views:

398

answers:

1

In a particular situation - there is too much code to publish on here - when I try to bind a generic List collection to the ItemsSource of a ListView, nothing happens. The ListView has been bound to a different collection previously. If I set the ListView ItemsSource to null, then the new binding works.

I tried to isolate the problem but everything worked as I expectit to. So it is something to do with my existing code. However if I change the List to an ObservableCollection (and change nothing else, it works without setting the ItemsSource to null.

I've fixed the problem but I'd really like to understand why it is happening. Any help appreciated.

+1  A: 

The renderer uses ObservableCollection events to know when to re-render the contents of databound controls.

BC