O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required