AppInstance.IsCurrentInstance Eigenschaft

Definition

Gibt an, ob der aktuelle instance der App der registrierte instance der App für den spezifischen Schlüssel ist, den diese instance definiert hat.

public:
 property bool IsCurrentInstance { bool get(); };
bool IsCurrentInstance();
public bool IsCurrentInstance { get; }
var boolean = appInstance.isCurrentInstance;
Public ReadOnly Property IsCurrentInstance As Boolean

Eigenschaftswert

Boolean

bool

Ein boolescher Wert, der angibt, ob die aktuelle App die registrierte instance der App ist.

Beispiele

Wenn im folgenden Beispiel die instance gefunden wurde, die aktuelle instance ist, wird diese instance aktiviert. Wenn es sich nicht um die aktuelle instance handelt, wird im Beispiel an die gefundene App instance umgeleitet.

if (theInstance.IsCurrentInstance)
{
    global::Windows.UI.Xaml.Application.Start((p) => new App(activatedArgs));
}
else
{
    theInstance.RedirectActivationTo();
}

Gilt für: