ProximitySensorReading 类

定义

表示来自邻近感应传感器的读数。

public ref class ProximitySensorReading sealed
/// [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 ProximitySensorReading final
[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 ProximitySensorReading
Public NotInheritable Class ProximitySensorReading
继承
Object Platform::Object IInspectable ProximitySensorReading
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

调用 GetCurrentReading 方法时会访问此对象;在事件回调方法中检索 ProximityReadingChangedEventArgs 对象的 Reading 属性时,会对其进行访问。

属性

DistanceInMillimeters

获取从邻近感应传感器到检测到的对象之间的距离。

IsDetected

获取邻近感应传感器是否检测到对象。

Timestamp

获取最近的邻近感应传感器读数的时间。

适用于