DisplayProperties DisplayProperties DisplayProperties DisplayProperties Class

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.

Syntax

Declaration

public static class DisplayPropertiespublic static class DisplayPropertiesPublic Static Class DisplayProperties

Properties summary

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.

Note

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

Gets the current orientation of a rectangular monitor.

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.

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.

Note

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

Gets the scale factor of the immersive environment.

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 summary

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 summary

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.

Note

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

Occurs when the display requires redrawing.

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.

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.

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.

Properties

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

    public static DisplayOrientations AutoRotationPreferences { get; set; }public static DisplayOrientations AutoRotationPreferences { get; set; }Public Static ReadWrite Property AutoRotationPreferences As DisplayOrientations

    Property Value

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

    public static DisplayOrientations CurrentOrientation { get; }public static DisplayOrientations CurrentOrientation { get; }Public Static ReadOnly Property CurrentOrientation As DisplayOrientations

    Property Value

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

    public static float LogicalDpi { get; }public static float LogicalDpi { get; }Public Static ReadOnly Property LogicalDpi As float

    Property Value

    • float
      float
      float
      float

      The pixels per logical inch of the current environment.

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

    public static DisplayOrientations NativeOrientation { get; }public static DisplayOrientations NativeOrientation { get; }Public Static ReadOnly Property NativeOrientation As DisplayOrientations

    Property Value

  • ResolutionScale
    ResolutionScale
    ResolutionScale
    ResolutionScale
    Note

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

    Gets the scale factor of the immersive environment.

    public static ResolutionScale ResolutionScale { get; }public static ResolutionScale ResolutionScale { get; }Public Static ReadOnly Property ResolutionScale As ResolutionScale

    Property Value

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

    public static bool StereoEnabled { get; }public static bool StereoEnabled { get; }Public Static ReadOnly Property StereoEnabled As bool

    Property Value

    • bool
      bool
      bool
      bool

      TRUE if the device is capable of stereoscopic 3D and stereoscopic 3D is currently enabled; FALSE otherwise.

Methods

  • GetColorProfileAsync()
    GetColorProfileAsync()
    GetColorProfileAsync()
    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.

    public static IAsyncOperation<IRandomAccessStream> GetColorProfileAsync()public static IAsyncOperation<IRandomAccessStream> GetColorProfileAsync()Public Static Function GetColorProfileAsync() As IAsyncOperation( Of IRandomAccessStream )

    Returns

    • Object that manages the asynchronous retrieval of the color profile.

Events

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

    public static event DisplayPropertiesEventHandler ColorProfileChangedpublic static event DisplayPropertiesEventHandler ColorProfileChangedPublic Static Event ColorProfileChanged
  • DisplayContentsInvalidated
    DisplayContentsInvalidated
    DisplayContentsInvalidated
    DisplayContentsInvalidated
    Note

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

    Occurs when the display requires redrawing.

    public static event DisplayPropertiesEventHandler DisplayContentsInvalidatedpublic static event DisplayPropertiesEventHandler DisplayContentsInvalidatedPublic Static Event DisplayContentsInvalidated

    Remarks

    Examples

    
        DisplayProperties::DisplayContentsInvalidated +=
            ref new DisplayPropertiesEventHandler(this, &ShapesPuzzle::OnDisplayContentsInvalidated);
    
  • LogicalDpiChanged
    LogicalDpiChanged
    LogicalDpiChanged
    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.

    public static event DisplayPropertiesEventHandler LogicalDpiChangedpublic static event DisplayPropertiesEventHandler LogicalDpiChangedPublic Static Event LogicalDpiChanged
  • OrientationChanged
    OrientationChanged
    OrientationChanged
    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.

    public static event DisplayPropertiesEventHandler OrientationChangedpublic static event DisplayPropertiesEventHandler OrientationChangedPublic Static Event OrientationChanged
  • StereoEnabledChanged
    StereoEnabledChanged
    StereoEnabledChanged
    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.

    public static event DisplayPropertiesEventHandler StereoEnabledChangedpublic static event DisplayPropertiesEventHandler StereoEnabledChangedPublic Static Event StereoEnabledChanged

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.DeprecatedAttribute
Windows.Foundation.Metadata.MuseAttribute

Details

Assembly

Windows.Graphics.Display.dll