According to Bluetooth and connect,
Bluetooth uses the connect function to connect to a target Bluetooth device, using a previously created Bluetooth socket.
Try Bluetooth app to device sample. But you cannot let Windows connect like Windows Settings do because Windows uses internal APIs to work with Windows components.