20.6. The ComboBox

Although styles and data templates are built into the ItemsControl class and supported by all the WPF list controls, so far all the examples you've seen have used the standard ListBox. There's nothing wrong with this fact—after all, the ListBox is thoroughly customizable and can easily handle lists of check boxes, images, formatted text, or a combination of all these types of content. However, other lists controls do introduce some new features. In Chapter 22, you'll learn about the frills of the ListView, TreeView, and DataGrid. But even the lowly ComboBox has a few extra considerations, and those are the details you'll explore in this section of this chapter.

Like the ListBox, the ComboBox is a descendant of the Selector ...

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.