Creating the Windows Phone UI

Thinking back to our prototype, we know that we need two pages within our Phone app: a master “list” page and a details page. When Visual Studio created the Windows Phone 8 project, it added a MainPage.xaml by default. We’ll make that our master list page.

We have a few options for controls to display our list of meals. ListView is a great choice; it’s easy to work with but still provides enough flexibility for multiple line templates, and so on.

The Master Page

With the MainPage open, create a new ListView control within the XAML. You can hand-craft the code or drag the control over from the toolbox. With the control in place, we need to tweak a few things. First, we need to bind the control to the view model that ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition 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.