AppInstance Class

Definition

Represents an instance of an app.

public ref class AppInstance sealed
/// [Windows.Foundation.Metadata.Experimental]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Version(1)]
class AppInstance final
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.AppLifecycle.AppLifecycleContract, 65536)]
class AppInstance final
[Windows.Foundation.Metadata.Experimental]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Version(1)]
public sealed class AppInstance
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.AppLifecycle.AppLifecycleContract), 65536)]
public sealed class AppInstance
Public NotInheritable Class AppInstance
Inheritance
AppInstance
Attributes

Examples

For code examples that demonstrsate how to use this class, see App instancing.

Remarks

For more information about using this class, see App instancing.

Properties

IsCurrent

Gets a value that indicates whether this AppInstance object represents the current instance of the app or a different instance.

Key

Gets an app-defined string value that identifies the current app instance for redirection purposes.

ProcessId

Gets the process ID of the app instance.

Methods

FindOrRegisterForKey(String)

Registers an app instance with the platform, or finds an existing instance if another instance has already registered this key.

GetActivatedEventArgs()

Retrieves the event arguments for an app activation that was registered by using one of the static methods of the ActivationRegistrationManager class.

GetCurrent()

Retrieves the current running instance of the app.

GetInstances()

Retrieves a collection of all running instances of the app.

RedirectActivationToAsync(AppActivationArguments)

Redirects the current activation request to another app instance.

Restart(String)
UnregisterKey()

Unregisters a given key for this app instance.

Events

Activated

Raised when an app activation is triggered that was registered by using one of the static methods of the ActivationRegistrationManager class.

Applies to

See also