#38 – The Application Class
August 19, 2010 Leave a comment
Application is a class that represents a WPF application running as a standalone client application in Windows. Each running application contains at most a single instance of Application.
WPF applications created using the Visual Studio 2013 New Project wizard will contain the definition of the Application object in the App.xaml file.
<Application x:Class="WpfApplication9.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> </Application>
The Application object is responsible for:
- Managing application lifetime (e.g. responding to startup/shutdown events)
- Window, property and resource management
- Command-line processing
- Navigation