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.
<Application x:Class="HelloWorld.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" ...
Get Windows® Phone 8 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.