Share via


UserPicker Class

Definition

Contains methods and properties for allowing a user to select a user account in multi-user scenarios.

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

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Constructors

UserPicker()

Creates a new UserPicker.

Properties

AllowGuestAccounts

Gets or sets whether picking guest accounts is allowed.

SuggestedSelectedUser

Gets or sets a suggested user for the picker to indicate in the UI.

Methods

IsSupported()

Determines if UserPicker is supported.

PickSingleUserAsync()

Displays a dialog for the user to pick a user account. The selected account is signed in, paired with the IGameController that selected it, and becomes obtainable using the User class. This method is only supported for multi-user devices and apps, and will throw an exception if called from a single user device or app.

Applies to