共用方式為


PerceptionControlSession.ControlLost 事件

定義

訂閱 ControlLost 事件。 當會話的控制遺失到另一個用戶端時,就會觸發此事件。

// Register
event_token ControlLost(TypedEventHandler<PerceptionControlSession, IInspectable const&> const& handler) const;

// Revoke with event_token
void ControlLost(event_token const* cookie) const;

// Revoke with event_revoker
PerceptionControlSession::ControlLost_revoker ControlLost(auto_revoke_t, TypedEventHandler<PerceptionControlSession, IInspectable const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("PerceptionControlSession may be unavailable after Windows Creator Update.  Please refer to Windows.Media.Capture.Frames APIs on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("PerceptionControlSession may be unavailable after Windows Creator Update.  Please refer to Windows.Media.Capture.Frames APIs on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
// Register
event_token ControlLost(TypedEventHandler<PerceptionControlSession, IInspectable const&> const& handler) const;

// Revoke with event_token
void ControlLost(event_token const* cookie) const;

// Revoke with event_revoker
PerceptionControlSession::ControlLost_revoker ControlLost(auto_revoke_t, TypedEventHandler<PerceptionControlSession, IInspectable const&> const& handler) const;
public event TypedEventHandler<PerceptionControlSession,object> ControlLost;
[add: Windows.Foundation.Metadata.Deprecated("PerceptionControlSession may be unavailable after Windows Creator Update.  Please refer to Windows.Media.Capture.Frames APIs on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("PerceptionControlSession may be unavailable after Windows Creator Update.  Please refer to Windows.Media.Capture.Frames APIs on MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<PerceptionControlSession,object> ControlLost;
function onControlLost(eventArgs) { /* Your code */ }
perceptionControlSession.addEventListener("controllost", onControlLost);
perceptionControlSession.removeEventListener("controllost", onControlLost);
- or -
perceptionControlSession.oncontrollost = onControlLost;
Public Custom Event ControlLost As TypedEventHandler(Of PerceptionControlSession, Object) 

事件類型

屬性

適用於