Lamp Lamp Lamp Lamp Lamp Class

Definition

Represents a lamp device.

public : sealed class Lamp : IClosable
struct winrt::Windows::Devices::Lights::Lamp : IClosable
public sealed class Lamp : IDisposable
Public NotInheritable Class Lamp Implements IDisposable
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

A common scenario for using this class is adding a flashlight feature to your app that allows the user to manually turn on and off a device's camera torch light, if one is available.

Properties

BrightnessLevel BrightnessLevel BrightnessLevel BrightnessLevel BrightnessLevel

Gets or sets a value indicating the current brightness level of the lamp, where 0.0 is completely off and 1.0 is maximum brightness.

Color Color Color Color Color

Gets or sets the color of the lamp.

DeviceId DeviceId DeviceId DeviceId DeviceId

Gets the DeviceInformation Id for a lamp device.

IsColorSettable IsColorSettable IsColorSettable IsColorSettable IsColorSettable

Gets a value indicating whether you can set the Color property of the lamp device.

IsEnabled IsEnabled IsEnabled IsEnabled IsEnabled

Gets a value indicating whether the lamp device is enabled.

Methods

Close() Close() Close() Close() Close()

Releases the lamp device.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)

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

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Gets a Lamp object representing the default lamp for the device.

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Returns the class selection string that you can use to enumerate lamp devices.

Events

AvailabilityChanged AvailabilityChanged AvailabilityChanged AvailabilityChanged AvailabilityChanged

Occurs when the availability of the lamp device changes.

See also