Share via


MiracastReceiverSession.Disconnected Event

Definition

An event which is raised when a MiracastReceiverConnection has been disconnected by the Miracast Transmitter.

// Register
event_token Disconnected(TypedEventHandler<MiracastReceiverSession, MiracastReceiverDisconnectedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MiracastReceiverSession::Disconnected_revoker Disconnected(auto_revoke_t, TypedEventHandler<MiracastReceiverSession, MiracastReceiverDisconnectedEventArgs const&> const& handler) const;
public event TypedEventHandler<MiracastReceiverSession,MiracastReceiverDisconnectedEventArgs> Disconnected;
function onDisconnected(eventArgs) { /* Your code */ }
miracastReceiverSession.addEventListener("disconnected", onDisconnected);
miracastReceiverSession.removeEventListener("disconnected", onDisconnected);
- or -
miracastReceiverSession.ondisconnected = onDisconnected;
Public Custom Event Disconnected As TypedEventHandler(Of MiracastReceiverSession, MiracastReceiverDisconnectedEventArgs) 

Event Type

Remarks

The app must subscribe to this event before invoking the MiracastReceiverSession.Start or MiracastReceiverSession.StartAsync method.

The event is not raised if the app itself requested the connection to be disconnected, for example, by invoking the Disconnect method.

Apps should check the MiracastReceiverDisconnectedEventArgs.Connection property to determine which connection was disconnected as a MiracastReceiverSession can handle multiple connections.

Applies to

See also