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).
App class derives from the
Application class by using the
x:Class attribute in the
Application element of the App.xaml file.
<Application x:Class="HelloWorld.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ...