Lamp.FromIdAsync(String) Lamp.FromIdAsync(String) Lamp.FromIdAsync(String) Lamp.FromIdAsync(String) Lamp.FromIdAsync(String) Method

Definition

Gets a Lamp object representing the lamp device with the specified ID.

public : static IAsyncOperation<Lamp> FromIdAsync(Platform::String deviceId)
static IAsyncOperation<Lamp> FromIdAsync(winrt::hstring deviceId) const;
public static IAsyncOperation<Lamp> FromIdAsync(String deviceId)
Public Shared Function FromIdAsync(deviceId As String) As IAsyncOperation(Of Lamp)
Windows.Devices.Lights.Lamp.fromIdAsync(deviceId).done( /* Your success and error handlers */ );

Parameters

deviceId
String String String

The ID of the requested lamp device.

Returns

An asynchronous operation that returns a Lamp object upon successful completion.

Remarks

Use GetDefaultAsync to get the default lamp for a device. Enumerate lamp devices by passing the class selection string returned by the GetDeviceSelector method to the FindAllAsync or CreateWatcher method. Once retrieved, use the DeviceId property to retrieve the ID for the associated lamp.