Encapsulates a Windows Presentation Foundation (WPF) application.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
is a class that encapsulates WPF application-specific functionality, including the following:
implements the singleton pattern to provide shared access to its window, property, and resource scope services. Consequently, only one instance of the class can be created per AppDomain.
You can implement an using markup, markup and code-behind, or code. If is implemented with markup, whether markup or markup and code-behind, the markup file must be configured as an Microsoft build engine (MSBuild) ApplicationDefinition item.
A standalone application does not require an object; it is possible to implement a custom static entry point method (Main) that opens a window without creating an instance of . However, XAML browser applications (XBAPs) require an object.
The following example shows how a standard application is defined using only markup:
The following example shows how a standard application is defined using only code:
The following example shows how a standard application is defined using a combination of markup and code-behind.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.