PowerManager.DisplayStatusChanged 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 status of the display that is associated with the app's session has changed.
// Register
static event_token DisplayStatusChanged(EventHandler<IInspectable> const& handler) const;
// Revoke with event_token
static void DisplayStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
static PowerManager::DisplayStatusChanged_revoker DisplayStatusChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
public static event System.EventHandler<object> DisplayStatusChanged;
function onDisplayStatusChanged(eventArgs) { /* Your code */ }
Microsoft.Windows.System.Power.PowerManager.addEventListener("displaystatuschanged", onDisplayStatusChanged);
Microsoft.Windows.System.Power.PowerManager.removeEventListener("displaystatuschanged", onDisplayStatusChanged);
- or -
Microsoft.Windows.System.Power.PowerManager.ondisplaystatuschanged = onDisplayStatusChanged;
Public Shared Custom Event DisplayStatusChanged As EventHandler(Of Object)
Event Type
Remarks
To get the current status of the display in response to this event, use the DisplayStatus property. This event corresponds to the GUID_SESSION_DISPLAY_STATUS power setting GUID.