The Application Class

XAML apps rely on an instance of the System.Windows.Application class to perform the startup activities of the app. Visual Studio’s Windows Phone App template creates an App class that subclasses the Application class. The App class consists of an App.xaml.cs file (the code-beside) containing a partial class and an accompanying App.xaml XAML file. The App.xaml file allows for resources, such as styles, to be defined in XAML and used throughout your app (see Listing 1.1).

The App class derives from the Application class by using the x:Class attribute in the Application element of the App.xaml file.

LISTING 1.1. App.xaml

<Application    x:Class="HelloWorld.App"    xmlns="" ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.