Delen via


DisplayProperties Class

Definition

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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.

public ref class DisplayProperties abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class DisplayProperties final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
class DisplayProperties final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public static class DisplayProperties
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Deprecated("DisplayProperties may be altered or unavailable for releases after Windows Phone 8.1. Instead, use DisplayInformation.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public static class DisplayProperties
Public Class DisplayProperties
Inheritance
Object Platform::Object IInspectable DisplayProperties
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

AutoRotationPreferences

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Gets and sets the preferred orientation of the app.

CurrentOrientation

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Gets the current orientation of a rectangular monitor.

LogicalDpi

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Gets the pixels per logical inch of the current environment.

NativeOrientation

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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.

ResolutionScale

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Gets the scale factor of the app window.

StereoEnabled

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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

Methods

GetColorProfileAsync()

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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

Events

ColorProfileChanged

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Occurs when the physical display's color profile changes.

DisplayContentsInvalidated

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

Occurs when the display requires redrawing.

LogicalDpiChanged

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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

OrientationChanged

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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

StereoEnabledChanged

Note

DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation.

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

Applies to