Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 3.28 KB

displayinformation.md

File metadata and controls

38 lines (25 loc) · 3.28 KB
-api-id -api-type
T:Windows.Graphics.Display.DisplayInformation
winrt class

Windows.Graphics.Display.DisplayInformation

-description

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.

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

Version history

Windows version SDK version Value added
1511 10586 DiagonalSizeInInches
1607 14393 ScreenHeightInRawPixels
1607 14393 ScreenWidthInRawPixels
1803 17134 AdvancedColorInfoChanged
1803 17134 GetAdvancedColorInfo

-examples

-see-also

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), Camera Advanced Capture sample