AppInstance.Activated 事件

定義

/// [Windows.Foundation.Metadata.Experimental]
/// [add: Windows.Foundation.Metadata.Experimental]
/// [remove: Windows.Foundation.Metadata.Experimental]
// Register
event_token Activated(EventHandler<AppActivationArguments> const& handler) const;

// Revoke with event_token
void Activated(event_token const* cookie) const;

// Revoke with event_revoker
AppInstance::Activated_revoker Activated(auto_revoke_t, EventHandler<AppActivationArguments> const& handler) const;
// Register
event_token Activated(EventHandler<AppActivationArguments> const& handler) const;

// Revoke with event_token
void Activated(event_token const* cookie) const;

// Revoke with event_revoker
AppInstance::Activated_revoker Activated(auto_revoke_t, EventHandler<AppActivationArguments> const& handler) const;
[Windows.Foundation.Metadata.Experimental]
[add: Windows.Foundation.Metadata.Experimental]
[remove: Windows.Foundation.Metadata.Experimental]
public event System.EventHandler<AppActivationArguments> Activated;
public event System.EventHandler<AppActivationArguments> Activated;
function onActivated(eventArgs) { /* Your code */ }
appInstance.addEventListener("activated", onActivated);
appInstance.removeEventListener("activated", onActivated);
- or -
appInstance.onactivated = onActivated;
Public Custom Event Activated As EventHandler(Of AppActivationArguments) 

事件類型

屬性

備註

此事件只會針對重新導向的啟用引發。 在其他所有情況下,應用程式應該使用 Microsoft.Windows.AppLifecycle.AppInstance.GetActivatedEventArgsWindows.ApplicationModel.AppInstance.GetActivatedEventArgs 來擷取啟用上的自變數。

適用於