共用方式為


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) 

事件類型

Windows 需求

應用程式功能
bluetooth

備註

在此事件的處理常式中,若要取得線上狀態查詢傳送至處理常式的BluetoothLEDevice.ConnectionStatus屬性。

適用於