Lamp Class
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.
Represents a lamp device.
public ref class Lamp sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class Lamp final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class Lamp : System.IDisposable
Public NotInheritable Class Lamp
Implements IDisposable
- Inheritance
- Attributes
- Implements
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
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 |
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 |
Gets or sets the color of the lamp. |
DeviceId |
Gets the DeviceInformation Id for a lamp device. |
IsColorSettable |
Gets a value indicating whether you can set the Color property of the lamp device. |
IsEnabled |
Gets a value indicating whether the lamp device is enabled. |
Methods
Close() |
Releases the lamp device. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
FromIdAsync(String) |
Gets a Lamp object representing the lamp device with the specified ID. |
GetDefaultAsync() |
Gets a Lamp object representing the default lamp for the device. |
GetDeviceSelector() |
Returns the class selection string that you can use to enumerate lamp devices. |
Events
AvailabilityChanged |
Occurs when the availability of the lamp device changes. |
Applies to
See also
Feedback
Submit and view feedback for