共用方式為


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

取得最近近接感應器讀數的時間。

適用於