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 grid view

Presenting items as rows using the list view is not the only way of showing a collection. You can also present items as tiles using the grid view, as shown in this recipe.

As an example, you will prepare a page with a grid view, where tiles will represent the categories of articles. Each tile will contain a name, a counter, and an icon. Of course, the example will use the data binding mechanism.

Getting ready

To step through this recipe, you need the automatically generated project configured according to the MVVM design pattern, as described in the Creating the view model for a page recipe.

How to do it...

To bind a collection to a grid view, in order to show a set of tiles on the page, perform the following steps: ...

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