Share via


LampArrayCustomEffect.UpdateRequested Event

Definition

Event triggered by the system to indicate that lamp state should be modified.

// Register
event_token UpdateRequested(TypedEventHandler<LampArrayCustomEffect, LampArrayUpdateRequestedEventArgs const&> const& handler) const;

// Revoke with event_token
void UpdateRequested(event_token const* cookie) const;

// Revoke with event_revoker
LampArrayCustomEffect::UpdateRequested_revoker UpdateRequested(auto_revoke_t, TypedEventHandler<LampArrayCustomEffect, LampArrayUpdateRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<LampArrayCustomEffect,LampArrayUpdateRequestedEventArgs> UpdateRequested;
function onUpdateRequested(eventArgs) { /* Your code */ }
lampArrayCustomEffect.addEventListener("updaterequested", onUpdateRequested);
lampArrayCustomEffect.removeEventListener("updaterequested", onUpdateRequested);
- or -
lampArrayCustomEffect.onupdaterequested = onUpdateRequested;
Public Custom Event UpdateRequested As TypedEventHandler(Of LampArrayCustomEffect, LampArrayUpdateRequestedEventArgs) 

Event Type

Examples

LampArray sample

Demonstrates how to control RGB lighting of peripheral devices using the Windows.Devices.Lights and Windows.Devices.Lights.Effects APIs.

AutoRGB Sample

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

  • Once a playlist starts the effect it will immediately trigger the UpdateRequested event.
  • If a playlist pauses the effect, it will temporarily stop further event triggers. Will resume when the playlist is started again.
  • If a playlist stops the effect, no further event triggers will occur until the playlist starts again.
  • The event will trigger a final time when the Duration has expired. This should be used by the caller to set any final state before the effect completes.

Behavior of multiple handlers registered with this event is undefined.

Applies to

See also