The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DisplayRequest class

Represents a display request.


var displayRequest = new Windows.System.Display.DisplayRequest();


The DisplayRequest class has these types of members:


The DisplayRequest class has these constructors.

DisplayRequest Creates an instance of the DisplayRequest class.



The DisplayRequest class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

RequestActive Activates a display request.
RequestRelease Deactivates a display request.



To conserve power and extend battery life, the system reduces power to the computer if it does not detect any user activity for a certain amount of time. Depending on system power settings, the display may first be dimmed, a screen saver may be displayed, and eventually the display may be turned off as the system enters a low-power sleep state.

Apps that show video or run for extended periods without user input can request that the display remain on by calling DisplayRequest::RequestActive. When a display request is activated, the device's display remains on while the app is visible. When the user moves the app out of the foreground, the system deactivates the app's display requests and reactivates them when the app returns to the foreground.

Display requests are cumulative - each display request must be released with a separate call to DisplayRequest::RequestRelease. An app should keep track of the number of active display requests and make sure all are released (each with a corresponding call to DisplayRequest::RequestRelease) when the app no longer requires the display to remain on. For more information see:

Using display requests to keep the display on consumes a lot of power. Use these guidelines for best app behavior when using display requests.

  • Use display requests only when required, that is, times when no user input is expected but the display should remain on. For example, during full screen presentations or when the user is reading an e-book.
  • Release each display request as soon as it is no longer required.
Note  This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Windows Phone 8

This API is supported in native apps only.


The following code (taken from the display power state sample) shows how to activate, track, and release display requests.

var g_dispRequest = null;
var drCount = 0;

function activateRequest() {

    if (g_dispRequest === null) {
        try {
            // This call creates an instance of the displayRequest object
            g_dispRequest = new Windows.System.Display.DisplayRequest;
        } catch (e) {
            WinJS.log && WinJS.log("Failed: displayRequest object creation, error: " + e.message, "sample", "error");

    if (g_dispRequest) {
        try {
            // This call activates a display-required request. If successful, 
            // the screen is guaranteed not to turn off automatically due to user inactivity.
            drCount += 1;
            WinJS.log && WinJS.log("Display request activated (" + drCount +")", "sample", "status");
        } catch (e) {
            WinJS.log && WinJS.log("Failed: displayRequest.requestActive, error: " + e.message, "sample", "error");

function releaseRequest() {
    if (g_dispRequest) {
        try {
            // This call de-activates the display-required request. If successful, the screen
            // might be turned off automatically due to a user inactivity, depending on the
            // power policy settings of the system. The requestRelease method throws an exception 
            // if it is called before a successful requestActive call on this object.
            drCount -= 1;
            WinJS.log && WinJS.log("Display request released (" + drCount +")", "sample", "status");
        }  catch (e) {
            WinJS.log && WinJS.log("Failed: displayRequest.requestRelease, error: " + e.message, "sample", "error");

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::System::Display [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8


Windows::System::Display [C++]





See also