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
Microsoft.SPOT..::..Application
Namespace: Microsoft.SPOT
Assembly: Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)
Syntax
'Declaration
Public Class Application _
Inherits DispatcherObject _
Implements IEventListener
public class Application : DispatcherObject,
IEventListener
public ref class Application : public DispatcherObject,
IEventListener
type Application =
class
inherit DispatcherObject
interface IEventListener
end
public class Application extends DispatcherObject implements IEventListener
The Application type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Application | Creates an instance of the Application class. |
Top
Properties
Name | Description | |
---|---|---|
Current | Gets the Application object for the current application domain. | |
MainWindow | Gets or sets the main window of the current application. | |
ShutdownMode | Gets or sets the condition that causes the Shutdown method to be called. | |
Windows | Gets the instantiated windows in the current application. |
Top
Methods
Name | Description | |
---|---|---|
CheckAccess | Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.) | |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
InitializeForEventSource | Initializes the input objects needed to process events. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnEvent | Processes known events, and forwards unrecognized ones as generic events. | |
OnExit | Raises the Exit event. | |
OnStartup | Raises the Startup event. | |
Run() () () () | Starts a Windows Presentation Foundation (WPF) application. | |
Run(Window) | Starts a Windows Presentation Foundation (WPF) application and opens a specified window. | |
Shutdown | Causes an application to exit. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
VerifyAccess | Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.) |
Top
Events
Name | Description | |
---|---|---|
Exit | Occurs just before an application exits. | |
Startup | Occurs when the Run method of an Application object is called. |
Top
Fields
Name | Description | |
---|---|---|
Dispatcher | Contains the Dispatcher object that the current DispatcherObject object is associated with. (Inherited from DispatcherObject.) |
Top
Remarks
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.