Share via


PerceptionControlSession.ControlLost Event

Definition

Subscribes to the ControlLost event. This event is triggered when control of the session is lost to another client.

// 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) 

Event Type

Attributes

Applies to