共用方式為


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

適用於