The Main Page User Interface

Every app consists of one or more windows with one or more pages. Our HelloRealWorld project, created from the Blank App template, is given a single window with a single page called MainPage. It defines what the user sees once your app has loaded and the splash screen has gone away. MainPage, like any page that would be used in an app, is implemented across two files: MainPage.xaml contains the user interface, and MainPage.xaml.cs contains the logic, often called the code-behind. Listing 1.1 shows the initial contents of MainPage.xaml.

LISTING 1.1 MainPage.xaml—The Initial Markup for the Main Page

<Page   x:Class="HelloRealWorld.MainPage"   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ...

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.