DisplayTarget Class

Definition

Represents a slice in time of a logical "target" for the display pipeline. This is typically analogous to a physical connector on a GPU, such as an HDMI port, but it can be a virtual target representing daisy-chained DisplayPort targets.

public ref class DisplayTarget sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 458752)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class DisplayTarget final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 458752)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class DisplayTarget
Public NotInheritable Class DisplayTarget
Inheritance
Object Platform::Object IInspectable DisplayTarget
Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

A DisplayTarget object is immutable, except for the IsStale property. If IsStale is true, then you can re-enumerate the latest state for all DisplayTarget objects by calling DisplayManager.GetCurrentTargets.

Properties

Adapter

Gets the adapter that enumerates this DisplayTarget.

AdapterRelativeId

Gets a driver-defined identifier for this target that uniquely identifies the connector across device starts and reboots. Note that this identifier is only unique within its adapter, and does not refer to the connected monitor at all.

DeviceInterfacePath

Gets the PnP device interface of any monitor connected to the target when the object was created, or null if no monitor was connected.

IsConnected

Gets a Boolean value indicating whether a monitor was connected to this DisplayTarget when it was created.

IsStale

Gets a value indicating whether the system display state has changed since this DisplayTarget was created.

IsVirtualModeEnabled

Returns a Boolean value indicating whether this target supports virtual modes.

IsVirtualTopologyEnabled

Returns a Boolean value indicating whether this target supports virtual/software clone.

MonitorPersistence

Gets a value representing how a monitor connected to the target is virtually persisted when the hardware no longer reports any connected monitor.

Properties

Reserved for future use.

StableMonitorId

Gets a value representing a stable monitor identifier.

UsageKind

Gets a value representing the usage kind.

Methods

IsEqual(DisplayTarget)

Determines whether all properties of the target are equivalent to another target, indicating that there has been no change to the target.

IsSame(DisplayTarget)

Determines whether this target object refers to the same underlying hardware target as another target object, by comparing the Adapter and the AdapterRelativeId properties. Since new DisplayTarget objects are created on each call to GetCurrentTargets, this method can be used to match previously discovered targets to newly created targets.

TryGetMonitor()

Tries to retrieve an object describing the monitor currently connected to this DisplayTarget. This method can fail or return a different monitor than the properties on the DisplayTarget describe if monitors have been plugged or unplugged from the DisplayTarget since the DisplayTarget object was created. IsStale returns true if the monitor might have changed since the DisplayTarget was created.

Applies to