BluetoothLEDevice.ConnectionStatusChanged 事件

定义

当设备的连接状态已更改时发生。

// Register
event_token ConnectionStatusChanged(TypedEventHandler<BluetoothLEDevice, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
BluetoothLEDevice::ConnectionStatusChanged_revoker ConnectionStatusChanged(auto_revoke_t, TypedEventHandler<BluetoothLEDevice, IInspectable const&> const& handler) const;
public event TypedEventHandler<BluetoothLEDevice,object> ConnectionStatusChanged;
function onConnectionStatusChanged(eventArgs) { /* Your code */ }
bluetoothLEDevice.addEventListener("connectionstatuschanged", onConnectionStatusChanged);
bluetoothLEDevice.removeEventListener("connectionstatuschanged", onConnectionStatusChanged);
- or -
bluetoothLEDevice.onconnectionstatuschanged = onConnectionStatusChanged;
Public Custom Event ConnectionStatusChanged As TypedEventHandler(Of BluetoothLEDevice, Object) 

事件类型

TypedEventHandler<BluetoothLEDevice,Object>

TypedEventHandler<BluetoothLEDevice,IInspectable>

Windows 要求

应用功能
bluetooth

注解

在此事件的处理程序中,若要获取传递到处理程序的 BluetoothLEDevice 上的 BluetoothLEDevice.ConnectionStatus 属性的连接状态查询。

适用于