CREATING A WINDOWS 8 APP

You are now going to develop the MemoryTest project into a working program. You will use a diverse range of controls just for the experience rather than for implementing the application in the most elegant way. Of course, this means that the example will not be as consistent in its design as it should be, and it will not demonstrate the many UI embellishments that are possible, but it will show you how to work with several of the controls you have available. The approach I will describe will give you experience of using the UI Designer pane to create the UI for the example as well as extending and modifying the XAML that specifies the UI to expand it. Again, this will not be the ideal approach in practice, but it is a good way to try out the various possibilities you have available to you.

The application will implement a memory testing game. It will display a set of 24 cards that are face down initially. The 24 cards consist of 12 matching pairs. The face of each card will be a circle, a square, or a triangle, colored red, green, blue, or yellow, so there are 12 different cards. To play the game you turn up successive pairs of cards. If the pair match in shape and color they remain turned up. You win the game when you have found all the matching pairs.

Application Files

If you look at the Solution Explorer pane, you’ll see two .xaml files. App.xaml defines the application object and MainPage.xaml defines the main page of the UI. In general, there will ...

Get Ivor Horton's Beginning Visual C++ 2012 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.