DisplayInformation class

Applies to Windows and Windows Phone

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;

Attributes

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

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/writeGets and sets the preferred orientation of the app.

CurrentOrientation

Read-onlyGets the current orientation of a rectangular monitor.

LogicalDpi

Read-onlyGets the pixels per logical inch of the current environment.

NativeOrientation

Read-onlyGets 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-onlyGets the raw dots per inch (DPI) along the x axis of the display monitor.

RawDpiY

Read-onlyGets the raw dots per inch (DPI) along the y axis of the display monitor.

RawPixelsPerViewPixel

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

ResolutionScale

Read-onlyGets the scale factor of the immersive environment.

StereoEnabled

Read-onlyGets 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

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

See also

Object

 

 

Show:
© 2014 Microsoft