Delen via


DeviceInformationPairing Class

Definition

Contains information and enables pairing for a device.

public ref class DeviceInformationPairing sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DeviceInformationPairing final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DeviceInformationPairing
Public NotInheritable Class DeviceInformationPairing
Inheritance
Object Platform::Object IInspectable DeviceInformationPairing
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Version history

Windows version SDK version Value added
1511 10586 Custom
1511 10586 PairAsync(DevicePairingProtectionLevel,IDevicePairingSettings)
1511 10586 ProtectionLevel
1511 10586 TryRegisterForAllInboundPairingRequests
1511 10586 UnpairAsync
1809 17763 TryRegisterForAllInboundPairingRequestsWithProtectionLevel

Properties

CanPair

Gets a value that indicates whether the device can be paired.

Custom

Gets the DeviceInformationCustomPairing object necessary for custom pairing.

IsPaired

Gets a value that indicates whether the device is currently paired.

ProtectionLevel

Gets the level of protection used to pair the device.

Methods

PairAsync()

Attempts to pair the device.

PairAsync(DevicePairingProtectionLevel, IDevicePairingSettings)

Attempts to pair a device object with a specified protection level and custom settings.

PairAsync(DevicePairingProtectionLevel)

Attempts to pair the device using a provided level of protection.

TryRegisterForAllInboundPairingRequests(DevicePairingKinds)

Registers the application to handle all inbound pairing requests.

TryRegisterForAllInboundPairingRequestsWithProtectionLevel(DevicePairingKinds, DevicePairingProtectionLevel)

Registers the application to handle all inbound pairing requests with the specified minimum level of protection.

UnpairAsync()

Attempts to unpair the device.

Applies to