O'Reilly logo

Illustrated WPF by Daniel Solis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. More Data Binding

Data Templates

In Chapter 8 you saw how to bind a control to a collection of data objects. In Chapter 13 you saw how to replace the default appearance of a control with an appearance of your own design. In this chapter, I'll combine and extend these two concepts and show you how to specify the appearance of data you've mapped to a control.

In the example at the end of Chapter 8, I mapped a set of data about four people, to a ComboBox control. For the first example in this chapter, I've modified that program so that the ComboBox is a now ListBox and is at the left of the window, as shown in Figure 15-1.

When the user selects an item in the ListBox, the panel to the right of the ListBox displays the information about that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required