DevicePairingKinds Enum

Definition

Defines constants that specify kinds of pairing supported by your application or requested by the system. As an input value, use this value to indicate what kinds of pairing your application supports. When this datatype is received as an output value, it indicates the kind of pairing requested by the system; in that case, your code will need to respond accordingly.

This enumeration supports a bitwise combination of its member values.

public enum class DevicePairingKinds
/// [System.Flags]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
enum class DevicePairingKinds
[System.Flags]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
public enum DevicePairingKinds
var value = Windows.Devices.Enumeration.DevicePairingKinds.none
Public Enum DevicePairingKinds
Inheritance
DevicePairingKinds
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)

Fields

ConfirmOnly 1

The application must confirm they wish to perform the pairing action. You can present an optional confirmation dialog to the user. With a value of ConfirmOnly, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete.

ConfirmPinMatch 8

The application must display the given PIN to the user and ask the user to confirm that the PIN matches the one show on the target device. With a value of ConfirmPinMatch, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete.

DisplayPin 2

The application must display the given PIN to the user. The user will then need to enter or confirm that PIN on the device that is being paired. With a value of DisplayPin, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete. If your application cancels the pairing at this point, the device might still be paired. This is because the system and the target device don't need any confirmation for this DevicePairingKinds value.

None 0

No pairing is supported.

ProvideAddress 32

The application must provide an address from the device. This is typically used for directed discovery over a network protocol such as IPP or UPnP, where the application already knows the IP/address/URL of the device. With a value of ProvideAddress, you should call AcceptWithAddress on the event args of the PairingRequested event handler, if you want the pairing to complete. Pass in the address as a parameter.

ProvidePasswordCredential 16

The application must request a user name and password from the user. With a value of ProvidePasswordCredential, call AcceptWithPasswordCredential from the event args of the PairingRequested event handler to accept the pairing. Pass in the PasswordCredential that encapsulates the user name and password as a parameter.

ProvidePin 4

The application must request a PIN from the user. The PIN will typically be displayed on the target device. With a value of ProvidePin, call Accept from the event args of the PairingRequested event handler if you want the pairing to complete. Pass in the PIN as a parameter.

Remarks

This value is a collection of flags. It's possible to have multiple values set for a single pairing action.

Version history

Windows version SDK version Value added
1903 18362 ProvidePasswordCredential

Applies to

See also