Provides various properties that are related to the physical display. For most of these properties, the class provides events to allow clients to monitor for changes in the properties.
- StaticAttribute(Windows.Graphics.Display.IDisplayPropertiesStatics, NTDDI_WIN8)
The DisplayProperties class has these types of members:
The DisplayProperties class has these events.
|ColorProfileChanged||Occurs when the physical display's color profile changes.|
|DisplayContentsInvalidated||Occurs when the display requires redrawing.|
|LogicalDpiChanged||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.|
The DisplayProperties class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
|GetColorProfileAsync||Asynchronously gets the default International Color Consortium (ICC) color profile that is associated with the physical display.|
The DisplayProperties class has these properties.
|Read/write||Gets and sets the preferred orientation of the app.|
|Read-only||Gets the current orientation of a rectangular monitor.|
|Read-only||Gets the pixels per logical inch of the current environment.|
|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.|
|Read-only||Gets the scale factor of the immersive environment.|
|Read-only||Gets a value that indicates whether the device supports stereoscopic 3D.|
We recommend that apps use a single delegate to handle most of the events because in most cases the change to each display property requires that the application redraw itself. Also, many property changes result from a single mode change that affects the entire operating system. All events share the following delegate type.
[version(NTDDI_WIN8), object, uuid(dbdd8b01-f1a1-46d1-9ee3-543bcc995980)] delegate HRESULT DisplayPropertiesEventHandler([in] IInspectable *sender);
Apps can then implement a separate handler and register that handler for each property change event.
Any property change event of DisplayProperties might trigger if your app is moved from one monitor to another monitor. ColorProfileChanged is only triggered when your app is moved to another monitor and that monitor has a different color profile. LogicalDpiChanged 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.
This API is supported in native apps only.
Minimum supported client
|Windows 8 [Windows Store apps only]|
Minimum supported server
|Windows Server 2012 [Windows Store apps only]|
Minimum supported phone
|Windows Phone 8|
Build date: 2/25/2013