Skip to main content
DisplayInformation class

Monitors and controls physical display information. The class provides events to allow clients to monitor for changes in the display.

Syntax


var displayInformation = Windows.Graphics.Display.DisplayInformation;

public sealed class DisplayInformation

Public NotInheritable Class DisplayInformation

public ref class DisplayInformation sealed 

Members

The DisplayInformation class has these types of members:

Events

The DisplayInformation class has these events.

EventDescription
ColorProfileChanged Occurs when the physical display's color profile changes.
DisplayContentsInvalidated Occurs when the display requires redrawing.
DpiChanged Occurs when the LogicalDpi property changes because the pixels per inch (PPI) of the display changes.
OrientationChanged Occurs when either the CurrentOrientation or NativeOrientation property changes because of a mode change or a monitor change.
StereoEnabledChanged Occurs when the StereoEnabled property changes because support for stereoscopic 3D changes.

 

Methods

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

MethodDescription
GetColorProfileAsync Asynchronously gets the default International Color Consortium (ICC) color profile that is associated with the physical display.
GetForCurrentView Gets the current physical display information.

 

Properties

The DisplayInformation class has these properties.

PropertyAccess typeDescription

AutoRotationPreferences

Read/write

Gets and sets the preferred orientation of the app.

CurrentOrientation

Read-only

Gets the current orientation of a rectangular monitor.

DiagonalSizeInInches

Read-only

Diagonal size of the display in inches.

LogicalDpi

Read-only

Gets the pixels per logical inch of the current environment.

NativeOrientation

Read-only

Gets the native orientation of the display monitor, which is typically the orientation where the buttons on the device match the orientation of the monitor.

RawDpiX

Read-only

Gets the raw dots per inch (DPI) along the x axis of the display monitor.

RawDpiY

Read-only

Gets the raw dots per inch (DPI) along the y axis of the display monitor.

RawPixelsPerViewPixel

Read-only

Gets a value representing the number of raw (physical) pixels for each view (layout) pixel.

ResolutionScale

Read-only

Gets the scale factor of the immersive environment.

ScreenHeightInRawPixels

Read-only

ScreenWidthInRawPixels

Read-only

StereoEnabled

Read-only

Gets a value that indicates whether the device supports stereoscopic 3D.

 

Remarks

To handle DisplayInformation events, use an event handler for the specific event. For example, for DisplayInformation.DpiChanged, use "TypedEventHandler<DisplayInformation, Object> DpiChanged."

Any property change event of DisplayInformation might trigger if your app is moved from one monitor to another monitor. ColorProfileChanged is triggered when the display’s color profile changes. DpiChanged is triggered when either the LogicalDpi or ResolutionScale property changes because a user selected a different zoom level or changed the screen resolution. OrientationChanged is triggered if a user changes the screen orientation.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Graphics.Display
Windows::Graphics::Display [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

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

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Graphics.Display
Windows::Graphics::Display [C++]

Metadata

Windows.winmd

Attributes

[ MarshalingBehavior(Agile)]
[ Version(0x06030000)]

See also

Object
Display orientation sample (Windows 10)
Scaling according to DPI sample (Windows 10)
Camera preview frame sample (Windows 10)
Basic camera app sample (Windows 10)
Video stabilization sample (Windows 10)
Camera face detection sample (Windows 10)
Manual camera controls sample (Windows 10)
High dynamic range sample (Windows 10)