BluetoothLEDevice.ConnectionPhyChanged 事件

定义

当设备的当前 PHY 发生更改时引发的事件。 只有在与设备建立连接后,PHY 才会更新。

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

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

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

事件类型

Windows 要求

设备系列
Windows 11 (在 10.0.22000.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v14.0 中引入)
应用功能
bluetooth

适用于