PowerManager.UserPresenceStatusChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Raised when the user status associated with the app's session has changed.
// Register
static event_token UserPresenceStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void UserPresenceStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::UserPresenceStatusChanged_revoker UserPresenceStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> UserPresenceStatusChanged;
function onUserPresenceStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("userpresencestatuschanged", onUserPresenceStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("userpresencestatuschanged", onUserPresenceStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.onuserpresencestatuschanged = onUserPresenceStatusChanged;
Public Shared Custom Event UserPresenceStatusChanged As EventHandler(Of Object)
Event Type
Remarks
To get the current user status in response to this event, use the UserPresenceStatus property. This event corresponds to the GUID_SESSION_USER_PRESENCE power setting GUID.