Application Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Encapsulates application-specific functionality, including application lifetime events and application-scope window management.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT. . :: . .DispatcherObject

Namespace:  Microsoft.SPOT
Assembly:  Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)


Public Class Application _
    Inherits DispatcherObject _
    Implements IEventListener
public class Application : DispatcherObject, 
public ref class Application : public DispatcherObject, 
type Application =  
        inherit DispatcherObject
        interface IEventListener
public class Application extends DispatcherObject implements IEventListener

The Application type exposes the following members.


  Name Description
Public method Application Creates an instance of the Application class.



  Name Description
Public propertyStatic member Current Gets the Application object for the current application domain.
Public property MainWindow Gets or sets the main window of the current application.
Public property ShutdownMode Gets or sets the condition that causes the Shutdown method to be called.
Public property Windows Gets the instantiated windows in the current application.



  Name Description
Public method CheckAccess Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeForEventSource Initializes the input objects needed to process events.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnEvent Processes known events, and forwards unrecognized ones as generic events.
Protected method OnExit Raises the Exit event.
Protected method OnStartup Raises the Startup event.
Public method Run() () () () Starts a Windows Presentation Foundation (WPF) application.
Public method Run(Window) Starts a Windows Presentation Foundation (WPF) application and opens a specified window.
Public method Shutdown Causes an application to exit.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method VerifyAccess Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.)



  Name Description
Public event Exit Occurs just before an application exits.
Public event Startup Occurs when the Run method of an Application object is called.



  Name Description
Public field Dispatcher Contains the Dispatcher object that the current DispatcherObject object is associated with. (Inherited from DispatcherObject.)



Each instance of the Application class is a singleton object whose application-scope services are shared across a single application domain. Consequently, only one Application object can be created per AppDomain object. To enable shared access, the Application class provides the static Current property, which returns a reference to the Application object for the current AppDomain object.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


Microsoft.SPOT Namespace