Default Collection Views

The SDK documentation for the individual views will tell you how each different kind of collection data is mapped to a default view, but Table 7-1 is a handy guide to help you along.

Table 7-1. The default views for each collection data type

Collection data

Default view

IEnumerable

CollectionView

IList

ListCollectionView

IBindingList

BindingListCollectionView

* Hopefully, you'll test the rest of your code before shipping it, too, but it never hurts to point these things out...

If you don't like the view that WPF provides, you can create your own implementation of ICollectionView and bind to that, too. In fact, this is handy for "stacking" views, that is, using one view as the input to another—when you need to implement custom views for features that WPF doesn't support out of the box (like "top N" functionality).

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment