ProximitySensor.ReadingChanged ProximitySensor.ReadingChanged ProximitySensor.ReadingChanged ProximitySensor.ReadingChanged ProximitySensor.ReadingChanged Event

Definition

Occurs each time the proximity sensor reports a new value.

public : event TypedEventHandler<ProximitySensor, ProximitySensorReadingChangedEventArgs> ReadingChanged
// Register
event_token ReadingChanged(TypedEventHandler<ProximitySensor, ProximitySensorReadingChangedEventArgs> const& handler) const;

// Revoke with event_token
void ReadingChanged(event_token const& cookie) const;

// Revoke with event_revoker
ReadingChanged_revoker ReadingChanged(auto_revoke_t, TypedEventHandler<ProximitySensor, ProximitySensorReadingChangedEventArgs> const& handler) const;
public event TypedEventHandler<ProximitySensor, ProximitySensorReadingChangedEventArgs> ReadingChanged
Public Event ReadingChanged As TypedEventHandler (Of ProximitySensor, ProximitySensorReadingChangedEventArgs)
function onReadingChanged(eventArgs){/* Your code */}


proximitySensor.addEventListener("readingchanged", onReadingChanged);
proximitySensor.removeEventListener("readingchanged", onReadingChanged);

Remarks

An application may register this event handler to obtain sensor readings.