Encapsulates a Windows Presentation Foundation (WPF) application.
Assembly: PresentationFramework (in PresentationFramework.dll)
Gets the AppDomain.object for the current
Gets or sets the main window of the application.
Gets a collection of application-scope properties.
Gets or sets the Assembly that provides the pack uniform resource identifiers (URIs) for resources in a WPF application.
Gets or sets a collection of application-scope resources, such as styles and brushes.
Gets or sets the condition that causes the Shutdown method to be called.
Gets or sets a UI that is automatically shown when an application starts.
Gets the instantiated windows in an application.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Retrieves a cookie for the location specified by a Uri.
Serves as the default hash function. (Inherited from Object.)
Loads a XAML file that is located at the specified uniform resource identifier (URI) and converts it to an instance of the object that is specified by the root element of the XAML file.
Loads a XAML file that is located at the specified uniform resource identifier (URI), and converts it to an instance of the object that is specified by the root element of the XAML file.
Raises the Activated event.
Raises the Deactivated event.
Raises the Exit event.
Raises the FragmentNavigation event.
Raises the LoadCompleted event.
Raises the Navigated event.
Raises the Navigating event.
Raises the NavigationFailed event.
Raises the NavigationProgress event.
Raises the NavigationStopped event.
Raises the SessionEnding event.
Raises the Startup event.
Starts a Windows Presentation Foundation (WPF) application.
Starts a Windows Presentation Foundation (WPF) application and opens the specified window.
Creates a cookie for the location specified by a Uri.
Shuts down an application.
Shuts down an application that returns the specified exit code to the operating system.
Returns a string that represents the current object.(Inherited from Object.)
Searches for the specified resource.
Occurs when an application becomes the foreground application.
Occurs when an application stops being the foreground application.
Occurs when an exception is thrown by an application but not handled.
Occurs just before an application shuts down, and cannot be canceled.
Occurs when a navigator in the application begins navigation to a content fragment, Navigation occurs immediately if the desired fragment is in the current content, or after the source XAML content has been loaded if the desired fragment is in different content.
Occurs when content that was navigated to by a navigator in the application has been loaded, parsed, and has begun rendering.
Occurs when the content that is being navigated to by a navigator in the application has been found, although it may not have completed loading.
Occurs when a new navigation is requested by a navigator in the application.
Occurs when an error occurs while a navigator in the application is navigating to the requested content.
Occurs periodically during a download that is being managed by a navigator in the application to provide navigation progress information.
Occurs when the StopLoading method of a navigator in the application is called, or when a new navigation is requested by a navigator while a current navigation is in progress.
Occurs when the user ends the Windows session by logging off or shutting down the operating system.
Occurs when the Run method of the object is called.
Queries for whether a specified ambient property is available in the current scope.
is a class that encapsulates WPF application-specific functionality, including the following:
You can implement anusing 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 Main) that opens a window without creating an instance of . However, XAML browser applications (XBAPs) require an object.object; it is possible to implement a custom static entry point method (
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.
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0