DisplayMonitor.GetDeviceSelector Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
An Advanced Query Syntax (AQS) device interface selector string.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for