Updating XAML and C# Code

With the tour of the package manifests complete, we are ready to fill our blank app with a little bit of content. Let’s look at the remaining files in our project and update them where necessary.

In this example, we want to use the exact same main page for both PCs and phones. Therefore, drag MainPage.xaml from the PC project to the shared project, then delete the copy of the file from the PC and phone projects. (These actions automatically apply to MainPage.xaml.cs as well, which is a child node of MainPage.xaml in Solution Explorer.) Now we are ready to work on a single codebase for both types of devices.

Get Universal Windows® Apps with XAML and C# Unleashed 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.