DevicePairingKinds DevicePairingKinds DevicePairingKinds DevicePairingKinds DevicePairingKinds Enum

Definition

Indicates the 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 this case, your code will need to respond accordingly.

This enumeration has a System.FlagsAttribute attribute that allows a bitwise combination of its member values.

public : enum class DevicePairingKinds
enum class winrt::Windows::Devices::Enumeration::DevicePairingKinds : uint32_t
public enum DevicePairingKinds
Public Enum DevicePairingKinds
var value = Windows.Devices.Enumeration.DevicePairingKinds.confirmOnly;
Attributes
System.FlagsAttribute ContractVersionAttribute

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Fields

ConfirmOnly ConfirmOnly ConfirmOnly ConfirmOnly 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 ConfirmPinMatch ConfirmPinMatch ConfirmPinMatch 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 DisplayPin DisplayPin DisplayPin 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 None None None None 0

No pairing is supported.

ProvidePasswordCredential ProvidePasswordCredential ProvidePasswordCredential ProvidePasswordCredential 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 ProvidePin ProvidePin ProvidePin 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 is possible to have multiple values set for a single pairing action.

Version history

Windows version SDK version Value added
1903 18362 ProvidePasswordCredential

See also