22.4. The Last Word

In this chapter, you took a closer look at the ItemsControl classes provided by WPF. You learned how to use the ListView to create lists with multiple viewing modes, the TreeView to show hierarchical data, and the DataGrid to view and edit a dense assortment of data in a single place.

The most impressive aspect of all these classes is that they derive from a single base class—the ItemsControl—that defines their essential functionality. The fact that all these controls share the same content model, the same data binding ability, and the same styling and templating features is one of WPF's small miracles. Remarkably, the ItemsControl defines all the basics for any WPF list control, even those that wrap hierarchical data, like ...

Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.