PerceptionColorFrameSourceWatcher.SourceAdded 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
订阅 SourceAdded 事件。
// Register
event_token SourceAdded(TypedEventHandler<PerceptionColorFrameSourceWatcher, PerceptionColorFrameSourceAddedEventArgs const&> const& handler) const;
// Revoke with event_token
void SourceAdded(event_token const* cookie) const;
// Revoke with event_revoker
PerceptionColorFrameSourceWatcher::SourceAdded_revoker SourceAdded(auto_revoke_t, TypedEventHandler<PerceptionColorFrameSourceWatcher, PerceptionColorFrameSourceAddedEventArgs const&> const& handler) const;
/// [add: 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")]
/// [remove: 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")]
// Register
event_token SourceAdded(TypedEventHandler<PerceptionColorFrameSourceWatcher, PerceptionColorFrameSourceAddedEventArgs const&> const& handler) const;
// Revoke with event_token
void SourceAdded(event_token const* cookie) const;
// Revoke with event_revoker
PerceptionColorFrameSourceWatcher::SourceAdded_revoker SourceAdded(auto_revoke_t, TypedEventHandler<PerceptionColorFrameSourceWatcher, PerceptionColorFrameSourceAddedEventArgs const&> const& handler) const;
public event TypedEventHandler<PerceptionColorFrameSourceWatcher,PerceptionColorFrameSourceAddedEventArgs> SourceAdded;
[add: 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")]
[remove: 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 event TypedEventHandler<PerceptionColorFrameSourceWatcher,PerceptionColorFrameSourceAddedEventArgs> SourceAdded;
function onSourceAdded(eventArgs) { /* Your code */ }
perceptionColorFrameSourceWatcher.addEventListener("sourceadded", onSourceAdded);
perceptionColorFrameSourceWatcher.removeEventListener("sourceadded", onSourceAdded);
- or -
perceptionColorFrameSourceWatcher.onsourceadded = onSourceAdded;
Public Custom Event SourceAdded As TypedEventHandler(Of PerceptionColorFrameSourceWatcher, PerceptionColorFrameSourceAddedEventArgs)
事件类型
- 属性
注解
调用 Start 方法时,系统会为系统已知的每个颜色帧源触发此事件,然后触发 EnumerationCompleted 事件。 随后添加的新颜色帧源将触发其他 SourceAdded 事件。