LampArrayUpdateRequestedEventArgs.SetSingleColorForIndices 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.
Sets all lamps specified to the same color.
public:
virtual void SetSingleColorForIndices(Color desiredColor, Platform::Array <int> ^ lampIndexes) = SetSingleColorForIndices;
void SetSingleColorForIndices(Color const& desiredColor, winrt::array_view <int> const& lampIndexes);
public void SetSingleColorForIndices(Color desiredColor, int[] lampIndexes);
function setSingleColorForIndices(desiredColor, lampIndexes)
Public Sub SetSingleColorForIndices (desiredColor As Color, lampIndexes As Integer())
Parameters
- desiredColor
- Color
The desired color.
- lampIndexes
-
Int32[]
int[]
Array of lamp indexes to set.
Examples
Demonstrates how to control RGB lighting of peripheral devices using the Windows.Devices.Lights and Windows.Devices.Lights.Effects APIs.
Demonstrates how to extract a single, representative color from a desktop screen and use it to illuminate LED lamps on a connected RGB device.
Remarks
If the lamp doesn't support the desired color, it is set to the NearestSupportedColor
If an index does not exist on the device or was not specified in the effect, it is ignored and the remaining are still applied.
Black is equivalent to a lamp being 'off'.