共用方式為


PerceptionDepthFrameSourceWatcher 類別

定義

監視深度畫面來源清單的變更,並在清單變更時提供通知。

public ref class PerceptionDepthFrameSourceWatcher 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 PerceptionDepthFrameSourceWatcher final
/// [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)]
/// [Windows.Foundation.Metadata.Deprecated("PerceptionDepthFrameSourceWatcher may be unavailable after Windows Creator Update.  Use Windows.Devices.Enumeration.DeviceWatcher instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
class PerceptionDepthFrameSourceWatcher 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 PerceptionDepthFrameSourceWatcher
[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)]
[Windows.Foundation.Metadata.Deprecated("PerceptionDepthFrameSourceWatcher may be unavailable after Windows Creator Update.  Use Windows.Devices.Enumeration.DeviceWatcher instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public sealed class PerceptionDepthFrameSourceWatcher
Public NotInheritable Class PerceptionDepthFrameSourceWatcher
繼承
Object Platform::Object IInspectable PerceptionDepthFrameSourceWatcher
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

屬性

Status

取得深度畫面來源監看員的操作狀態。

方法

Start()

呼叫這個方法時,深度畫面來源監看員會列舉它尚未列舉的任何現有深度畫面來源,方法是為每個來源引發 SourceAdded 事件。 當這個列舉完成時,就會引發 EnumerationCompleted 事件。 深度畫面來源接著會開始監看新的深度畫面來源。

Stop()

呼叫此方法時,深度畫面來源監看員會停止尋找深度畫面來源清單的變更。 此作業不是立即的;停止事件會在停止作業完成時觸發。

事件

EnumerationCompleted

訂閱 EnumerationCompleted 事件。 此事件會在已知深度畫面來源的初始列舉完成之後引發。

SourceAdded

訂閱 SourceAdded 事件。

SourceRemoved

訂閱 SourceRemoved 事件。 針對移除的每個深度畫面來源,都會引發此事件一次。

Stopped

訂閱 Stopped 事件。 當 IPerceptionColorFrameSourceWatcher 停止接聽深度畫面來源清單的變更時,就會引發此事件。

適用於