PerceptionColorFrameSourceWatcher 类

定义

监视对颜色帧源列表的更改,并在列表更改时提供通知。

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

Windows 要求

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

属性

Status

获取颜色帧源观察程序的操作状态。

方法

Start()

调用此方法时,颜色帧源观察程序会通过为每个颜色帧触发 SourceAdded 事件来枚举它尚未枚举的任何现有颜色帧源。 此枚举完成后,将触发 EnumerationCompleted 事件。 然后,颜色帧源开始监视新的颜色帧源。

Stop()

调用此方法时,颜色帧源观察程序将停止查找对颜色帧源列表的更改。 此操作不是即时的;停止操作完成后,将触发 Stopped 事件。

事件

EnumerationCompleted

订阅 EnumerationCompleted 事件。 在完成已知颜色帧源的初始枚举后触发此事件。

SourceAdded

订阅 SourceAdded 事件。

SourceRemoved

订阅 SourceRemoved 事件。 对于删除的每个颜色帧源,都会触发一次此事件。

Stopped

订阅 Stopped 事件。 当 IPerceptionColorFrameSourceWatcher 停止侦听对颜色帧源列表的更改时,将触发此事件。

适用于