ApplicationLifetimeObjects Property
Collapse the table of content
Expand the table of content

Application.ApplicationLifetimeObjects Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the application extension services that have been registered for this application.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public IList ApplicationLifetimeObjects { get; }
<Application>
  <Application.ApplicationLifetimeObjects>
    oneOrMoreServiceElements
  </Application.ApplicationLifetimeObjects>
</Application>

XAML Values

oneOrMoreServiceElements

One or more object elements, each of which creates and defines an IApplicationService instance. Each element requires an XML namespace prefix mapped to the namespace and assembly where the service is defined.

Property Value

Type: System.Collections.IList
The registered services.

Application extension services let you extend theWindows Phone application model without requiring specialized Application subclasses. Applications can continue to inherit the Application class directly, and can add extensions by populating the ApplicationLifetimeObjects list. Applications can do this in the class constructor or in the application XAML.

Application extension services implement the IApplicationService interface and optionally the IApplicationLifetimeAware interface. These interfaces define access points to the application lifetime events.

The order of the services in the ApplicationLifetimeObjects list dictates the order in which the services are initialized. This is also the order in which the services receive application lifetime event notifications. The services are shut down in the opposite order. The guaranteed ordering enables services to fulfill complex dependencies in the application and in other services.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft