Reputation: 1290
I currently populate pushpins on a WP7 Bing map using a MapLayer all in c#. This is ok, but have recently come across some issues including a bug in the map control causing some problems, so I am looking to change to the system where you build an observable collection which genreates the pushpins/locations etc, then bind the Pushpin locations to the map with XAML. Similar to this: http://beyondrelational.com/blogs/dinesh/archive/2010/06/26/bing-maps-binding-xml-data-source.aspx (which I cant quite get to work unfortunately.)
My main question is, Is there a reason people use ObservableCollection for this, as opposed to other collections?
I will be genreating the collection from linq-to-xml results downlaoded from a feed (somehow) :-)
Thanks.
Upvotes: 0
Views: 857
Reputation: 14882
Generally ObservableCollection is employed for the binding functionality. When items are added/removed from an ObservableCollection, the UI element they are bound to will automatically update.
Upvotes: 1