DeviceInformationPairing
DeviceInformationPairing
DeviceInformationPairing
DeviceInformationPairing
Class
Definition
Contains information and enables pairing for a device.
public : sealed class DeviceInformationPairing : IDeviceInformationPairing, IDeviceInformationPairing2public sealed class DeviceInformationPairing : IDeviceInformationPairing, IDeviceInformationPairing2Public NotInheritable Class DeviceInformationPairing Implements IDeviceInformationPairing, IDeviceInformationPairing2// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
CanPair CanPair CanPair CanPair
Gets a value that indicates whether the device can be paired.
public : PlatForm::Boolean CanPair { get; }public bool CanPair { get; }Public ReadOnly Property CanPair As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the device can be paired, otherwise false.
Custom Custom Custom Custom
Gets the DeviceInformationCustomPairing object necessary for custom pairing.
public : DeviceInformationCustomPairing Custom { get; }public DeviceInformationCustomPairing Custom { get; }Public ReadOnly Property Custom As DeviceInformationCustomPairing// You can use this property in JavaScript.
- Value
- DeviceInformationCustomPairing DeviceInformationCustomPairing DeviceInformationCustomPairing DeviceInformationCustomPairing
The associated DeviceInformationCustomPairing object.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
IsPaired IsPaired IsPaired IsPaired
Gets a value that indicates whether the device is currently paired.
public : PlatForm::Boolean IsPaired { get; }public bool IsPaired { get; }Public ReadOnly Property IsPaired As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the device is currently paired, otherwise false.
ProtectionLevel ProtectionLevel ProtectionLevel ProtectionLevel
Gets the level of protection used to pair the device.
public : DevicePairingProtectionLevel ProtectionLevel { get; }public DevicePairingProtectionLevel ProtectionLevel { get; }Public ReadOnly Property ProtectionLevel As DevicePairingProtectionLevel// You can use this property in JavaScript.
- Value
- DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel
The protection level.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Methods
PairAsync() PairAsync() PairAsync() PairAsync()
Attempts to pair the device.
public : IAsyncOperation<DevicePairingResult> PairAsync()public IAsyncOperation<DevicePairingResult> PairAsync()Public Function PairAsync() As IAsyncOperation( Of DevicePairingResult )// You can use this method in JavaScript.
The result of the pairing action.
- See Also
PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel) PairAsync(DevicePairingProtectionLevel)
Attempts to pair the device using a provided level of protection.
public : IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel)public IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel)Public Function PairAsync(minProtectionLevel As DevicePairingProtectionLevel) As IAsyncOperation( Of DevicePairingResult )// You can use this method in JavaScript.
- minProtectionLevel
- DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel
The required level of protection to use for the pairing action.
The result of the pairing action.
- See Also
PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings) PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings)
Attempts to pair a device object with a specified protection level and custom settings.
public : IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings devicePairingSettings)public IAsyncOperation<DevicePairingResult> PairAsync(DevicePairingProtectionLevel minProtectionLevel, IDevicePairingSettings devicePairingSettings)Public Function PairAsync(minProtectionLevel As DevicePairingProtectionLevel, devicePairingSettings As IDevicePairingSettings) As IAsyncOperation( Of DevicePairingResult )// You can use this method in JavaScript.
- minProtectionLevel
- DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel DevicePairingProtectionLevel
The required level of protection to use for the pairing action.
- devicePairingSettings
- IDevicePairingSettings IDevicePairingSettings IDevicePairingSettings IDevicePairingSettings
The custom device pairing settings.
The result of the pairing action.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
- See Also
TryRegisterForAllInboundPairingRequests(DevicePairingKinds) TryRegisterForAllInboundPairingRequests(DevicePairingKinds) TryRegisterForAllInboundPairingRequests(DevicePairingKinds) TryRegisterForAllInboundPairingRequests(DevicePairingKinds)
Registers the application to handle all inbound pairing requests.
public : static PlatForm::Boolean TryRegisterForAllInboundPairingRequests(DevicePairingKinds pairingKindsSupported)public static bool TryRegisterForAllInboundPairingRequests(DevicePairingKinds pairingKindsSupported)Public Static Function TryRegisterForAllInboundPairingRequests(pairingKindsSupported As DevicePairingKinds) As bool// You can use this method in JavaScript.
- pairingKindsSupported
- DevicePairingKinds DevicePairingKinds DevicePairingKinds DevicePairingKinds
The pairing kinds your app supports.
Whether or not the attempt was successful.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Remarks
This API only works with Windows 10 IoT Core (IoT Core) applications.
UnpairAsync() UnpairAsync() UnpairAsync() UnpairAsync()
Attempts to unpair the device.
public : IAsyncOperation<DeviceUnpairingResult> UnpairAsync()public IAsyncOperation<DeviceUnpairingResult> UnpairAsync()Public Function UnpairAsync() As IAsyncOperation( Of DeviceUnpairingResult )// You can use this method in JavaScript.
The result of the unpairing action.
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|