Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Prerelease APIs are identified by a Prerelease label.
[Contains prerelease APIs.]
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
struct winrt::Windows::Graphics::Display::DisplayInformation : IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4
public sealed class DisplayInformation : IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4
Public NotInheritable Class DisplayInformation Implements IDisplayInformation, IDisplayInformation2, IDisplayInformation3, IDisplayInformation4
// This class does not provide a public constructor.
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
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.
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.
|GetAdvancedColorInfo() GetAdvancedColorInfo() GetAdvancedColorInfo() GetAdvancedColorInfo() GetAdvancedColorInfo()||
Prerelease. 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.
|AdvancedColorInfoChanged AdvancedColorInfoChanged AdvancedColorInfoChanged AdvancedColorInfoChanged AdvancedColorInfoChanged||
Prerelease. 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|
|StereoEnabledChanged StereoEnabledChanged StereoEnabledChanged StereoEnabledChanged StereoEnabledChanged||
Occurs when the StereoEnabled property changes because support for stereoscopic 3D changes.
- 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)