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 hub

The last control presented in this chapter is the hub that presents a collection of sections. It can also be supported by the data binding mechanism, as explained in this recipe.

As an example, you will create a page with a scrollable photo gallery. Each photo is presented as a separate hub section with a given header.

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 hub, in order to create a page with a scrollable photo gallery, perform the following steps:

  1. Add the G01.jpg, G02.jpg, G03.jpg, and G04.jpg files (representing some images ...

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