O'Reilly logo

Windows Application Development Cookbook by Marcin Jamro

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

Binding a collection to a list view

In the previous recipes, you learned how to use the MVVM design pattern and data binding with various controls available out of the box, such as a textbox, a text block, or a progress bar. Apart from these controls, there is another set that presents a list of items, such as a list view, a grid view, or a combobox. Of course, they could also benefit from data binding. In this recipe, you will learn how to use data binding for a list view.

As an example, you will create a page that will present a list of people. Each row will contain a name, current location, and the number of days remaining until the next birthday. After clicking on an item, a message dialog will be shown.

Getting ready

To step through this recipe, ...

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