WiFiDirectDevice.ConnectionStatusChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when a Wi-Fi Direct device connection is connected or disconnected.
// Register
event_token ConnectionStatusChanged(TypedEventHandler<WiFiDirectDevice, IInspectable const&> const& handler) const;
// Revoke with event_token
void ConnectionStatusChanged(event_token const* cookie) const;
// Revoke with event_revoker
WiFiDirectDevice::ConnectionStatusChanged_revoker ConnectionStatusChanged(auto_revoke_t, TypedEventHandler<WiFiDirectDevice, IInspectable const&> const& handler) const;
public event TypedEventHandler<WiFiDirectDevice,object> ConnectionStatusChanged;
function onConnectionStatusChanged(eventArgs) { /* Your code */ }
wiFiDirectDevice.addEventListener("connectionstatuschanged", onConnectionStatusChanged);
wiFiDirectDevice.removeEventListener("connectionstatuschanged", onConnectionStatusChanged);
- or -
wiFiDirectDevice.onconnectionstatuschanged = onConnectionStatusChanged;
Public Custom Event ConnectionStatusChanged As TypedEventHandler(Of WiFiDirectDevice, Object)
Event Type
TypedEventHandler<WiFiDirectDevice,IInspectable>
Remarks
You can add a handler for the ConnectionStatusChanged event to be notified when the connection has been established or disconnected.