Share via


DisplayMonitor.GetDeviceSelector Method

Definition

Returns an Advanced Query Syntax (AQS) device interface selector string for the purpose of retrieving device interfaces (rather than devices).

The selector can be used by DeviceInformation.CreateWatcher to watch and enumerate monitor devices on the system. Or it can be used with DeviceInformation.FindAllAsync to retrieve a collection of DeviceInformation objects that describe monitor interfaces (rather than monitor devices). Accessing the DeviceInformation.Id property on one of those objects retrieves a monitor interface identifier, which you can pass to DisplayMonitor.FromInterfaceIdAsync (for details, see the code example for DisplayMonitor.FromInterfaceIdAsync). If you request the System.Devices.DeviceInstanceId additional property from FindAllAsync, then you can call DisplayMonitor.FromIdAsync (for details, see the code example for DisplayMonitor.FromIdAsync).

public:
 static Platform::String ^ GetDeviceSelector();
 static winrt::hstring GetDeviceSelector();
public static string GetDeviceSelector();
function getDeviceSelector()
Public Shared Function GetDeviceSelector () As String

Returns

String

Platform::String

winrt::hstring

An Advanced Query Syntax (AQS) device interface selector string.

Applies to

See also