ProximitySensorReading
ProximitySensorReading
ProximitySensorReading
ProximitySensorReading
Class
Definition
Represents a reading from the proximity sensor.
public : sealed class ProximitySensorReading : IProximitySensorReadingpublic sealed class ProximitySensorReading : IProximitySensorReadingPublic NotInheritable Class ProximitySensorReading Implements IProximitySensorReading// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
This object is accessed when you invoke the GetCurrentReading method; and it is accessed when you retrieve the Reading property of the ProximityReadingChangedEventArgs object in the event callback method.
Properties
DistanceInMillimeters DistanceInMillimeters DistanceInMillimeters DistanceInMillimeters
Gets the distance from the proximity sensor to the detected object.
public : IReference<uint> DistanceInMillimeters { get; }public Nullable<uint> DistanceInMillimeters { get; }Public ReadOnly Property DistanceInMillimeters As Nullable<uint>// You can use this property in JavaScript.
- Value
- IReference<unsigned int> Nullable<uint> Nullable<uint> Nullable<uint>
The distance between the sensor and the object in millimeters.
IsDetected IsDetected IsDetected IsDetected
Gets whether or not an object is detected by the proximity sensor.
public : PlatForm::Boolean IsDetected { get; }public bool IsDetected { get; }Public ReadOnly Property IsDetected As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if an object is detected by the proximity sensor; otherwise false.
Timestamp Timestamp Timestamp Timestamp
Gets the time for the most recent proximity sensor reading.
public : DateTime Timestamp { get; }public DateTimeOffset Timestamp { get; }Public ReadOnly Property Timestamp As DateTimeOffset// You can use this property in JavaScript.
- Value
- DateTime DateTimeOffset DateTimeOffset DateTimeOffset
The time when the proximity sensor reported the reading.