DisplayInformation DisplayInformation DisplayInformation DisplayInformation DisplayInformation Class

Definition

Monitors and controls display-related information for an application view. The class provides events to allow clients to monitor for changes in the application view affecting which display(s) the view resides on, as well as changes in displays that can affect the application view.

public : sealed class DisplayInformation : IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4, IDisplayInformation5
struct winrt::Windows::Graphics::Display::DisplayInformation : IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4, IDisplayInformation5
public sealed class DisplayInformation : IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4, IDisplayInformation5
Public NotInheritable Class DisplayInformation Implements IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4, IDisplayInformation5
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

A DisplayInformation instance does not map to a specific display, but instead tracks display-related information for wherever the application view is placed. Calling GetForCurrentView will always return the single instance for the current thread's CoreApplicationView. An instance of DisplayInformation can only be used from the thread on which it was created.

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 the LogicalDpi, ResolutionScale, and RawPixelsPerViewPixel properties change because a user selected a different zoom level or changed the screen resolution. OrientationChanged is triggered if a user changes the screen orientation.

Properties

AutoRotationPreferences AutoRotationPreferences AutoRotationPreferences AutoRotationPreferences AutoRotationPreferences

Gets and sets the preferred orientation of the app.

CurrentOrientation CurrentOrientation CurrentOrientation CurrentOrientation CurrentOrientation

Gets the current orientation of a rectangular monitor.

DiagonalSizeInInches DiagonalSizeInInches DiagonalSizeInInches DiagonalSizeInInches DiagonalSizeInInches

Diagonal size of the display in inches.

LogicalDpi LogicalDpi LogicalDpi LogicalDpi LogicalDpi

Gets the pixels per logical inch of the current environment.

NativeOrientation NativeOrientation NativeOrientation NativeOrientation NativeOrientation

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 RawDpiX RawDpiX RawDpiX RawDpiX

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

RawDpiY RawDpiY RawDpiY RawDpiY RawDpiY

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

RawPixelsPerViewPixel RawPixelsPerViewPixel RawPixelsPerViewPixel RawPixelsPerViewPixel RawPixelsPerViewPixel

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

ResolutionScale ResolutionScale ResolutionScale ResolutionScale ResolutionScale

Gets the scale factor of the immersive environment.

ScreenHeightInRawPixels ScreenHeightInRawPixels ScreenHeightInRawPixels ScreenHeightInRawPixels ScreenHeightInRawPixels

Returns the current height resolution of the logical monitor.

ScreenWidthInRawPixels ScreenWidthInRawPixels ScreenWidthInRawPixels ScreenWidthInRawPixels ScreenWidthInRawPixels

Returns the current width resolution of the logical monitor.

StereoEnabled StereoEnabled StereoEnabled StereoEnabled StereoEnabled

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

Methods

GetAdvancedColorInfo() GetAdvancedColorInfo() GetAdvancedColorInfo() GetAdvancedColorInfo() GetAdvancedColorInfo()

Retrieves the Advanced Color information.

GetColorProfileAsync() GetColorProfileAsync() GetColorProfileAsync() GetColorProfileAsync() GetColorProfileAsync()

Asynchronously gets the default International Color Consortium (ICC) color profile that is associated with the physical display.

GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView()

Gets the DisplayInformation instance associated with the current thread's CoreApplicationView. This DisplayInformation instance is tied to the view and cannot be used from other threads.

Events

AdvancedColorInfoChanged AdvancedColorInfoChanged AdvancedColorInfoChanged AdvancedColorInfoChanged AdvancedColorInfoChanged

Raised when the advanced color information is changed.

ColorProfileChanged ColorProfileChanged ColorProfileChanged ColorProfileChanged ColorProfileChanged

Occurs when the physical display's color profile changes.

DisplayContentsInvalidated DisplayContentsInvalidated DisplayContentsInvalidated DisplayContentsInvalidated DisplayContentsInvalidated

Occurs when the display requires redrawing.

DpiChanged DpiChanged DpiChanged DpiChanged DpiChanged

Occurs when the LogicalDpi property changes because the pixels per inch (PPI) of the display changes.

OrientationChanged OrientationChanged OrientationChanged OrientationChanged OrientationChanged

Occurs when either the CurrentOrientation or NativeOrientation property changes because of a mode change or a monitor change.

StereoEnabledChanged StereoEnabledChanged StereoEnabledChanged StereoEnabledChanged StereoEnabledChanged

Occurs when the StereoEnabled property changes because support for stereoscopic 3D changes.

See Also