PerceptionDepthFrameSourceWatcher.SourceAdded 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
訂閱 SourceAdded 事件。
// Register
event_token SourceAdded(TypedEventHandler<PerceptionDepthFrameSourceWatcher, PerceptionDepthFrameSourceAddedEventArgs const&> const& handler) const;
// Revoke with event_token
void SourceAdded(event_token const* cookie) const;
// Revoke with event_revoker
PerceptionDepthFrameSourceWatcher::SourceAdded_revoker SourceAdded(auto_revoke_t, TypedEventHandler<PerceptionDepthFrameSourceWatcher, PerceptionDepthFrameSourceAddedEventArgs const&> const& handler) const;
/// [add: 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")]
/// [remove: 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")]
// Register
event_token SourceAdded(TypedEventHandler<PerceptionDepthFrameSourceWatcher, PerceptionDepthFrameSourceAddedEventArgs const&> const& handler) const;
// Revoke with event_token
void SourceAdded(event_token const* cookie) const;
// Revoke with event_revoker
PerceptionDepthFrameSourceWatcher::SourceAdded_revoker SourceAdded(auto_revoke_t, TypedEventHandler<PerceptionDepthFrameSourceWatcher, PerceptionDepthFrameSourceAddedEventArgs const&> const& handler) const;
public event TypedEventHandler<PerceptionDepthFrameSourceWatcher,PerceptionDepthFrameSourceAddedEventArgs> SourceAdded;
[add: 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")]
[remove: 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 event TypedEventHandler<PerceptionDepthFrameSourceWatcher,PerceptionDepthFrameSourceAddedEventArgs> SourceAdded;
function onSourceAdded(eventArgs) { /* Your code */ }
perceptionDepthFrameSourceWatcher.addEventListener("sourceadded", onSourceAdded);
perceptionDepthFrameSourceWatcher.removeEventListener("sourceadded", onSourceAdded);
- or -
perceptionDepthFrameSourceWatcher.onsourceadded = onSourceAdded;
Public Custom Event SourceAdded As TypedEventHandler(Of PerceptionDepthFrameSourceWatcher, PerceptionDepthFrameSourceAddedEventArgs)
事件類型
- 屬性
備註
呼叫 Start 方法時,系統會針對系統已知的每個深度畫面來源引發此事件,然後引發 EnumerationCompleted 事件。 後續新增的新深度畫面來源將會觸發其他 SourceAdded 事件。