DevicePicker DevicePicker DevicePicker DevicePicker Class

Definition

Represents a picker flyout that contains a list of devices for the user to choose from.

public : sealed class DevicePicker : IDevicePickerpublic sealed class DevicePicker : IDevicePickerPublic NotInheritable Class DevicePicker Implements IDevicePicker// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

DevicePicker() DevicePicker() DevicePicker() DevicePicker()

Creates a DevicePicker object.

public : DevicePicker()public DevicePicker()Public Sub New()// You can use this method in JavaScript.

Properties

Appearance Appearance Appearance Appearance

Gets the colors of the picker.

public : DevicePickerAppearance Appearance { get; }public DevicePickerAppearance Appearance { get; }Public ReadOnly Property Appearance As DevicePickerAppearance// You can use this property in JavaScript.

Filter Filter Filter Filter

Gets the filter used to choose what devices to show in the picker.

public : DevicePickerFilter Filter { get; }public DevicePickerFilter Filter { get; }Public ReadOnly Property Filter As DevicePickerFilter// You can use this property in JavaScript.

RequestedProperties RequestedProperties RequestedProperties RequestedProperties

Gets a collection of properties for the returned device information object.

public : IVector<string> RequestedProperties { get; }public IList<string> RequestedProperties { get; }Public ReadOnly Property RequestedProperties As IList<string>// You can use this property in JavaScript.
Value
IVector<PlatForm::String> IList<string> IList<string> IList<string>

The properties you want returned.

Methods

Hide() Hide() Hide() Hide()

Hides the picker.

public : void Hide()public void Hide()Public Function Hide() As void// You can use this method in JavaScript.

PickSingleDeviceAsync(Rect) PickSingleDeviceAsync(Rect) PickSingleDeviceAsync(Rect) PickSingleDeviceAsync(Rect)

Shows the picker UI and returns the selected device; does not require you to register for an event. The picker flies out from the edge of the specified rectangle.

public : IAsyncOperation<DeviceInformation> PickSingleDeviceAsync(Rect selection)public IAsyncOperation<DeviceInformation> PickSingleDeviceAsync(Rect selection)Public Function PickSingleDeviceAsync(selection As Rect) As IAsyncOperation( Of DeviceInformation )// You can use this method in JavaScript.
Parameters
selection
Rect Rect Rect Rect

The rectangle from which you want the picker to fly out.

Returns
See Also

PickSingleDeviceAsync(Rect, Placement) PickSingleDeviceAsync(Rect, Placement) PickSingleDeviceAsync(Rect, Placement) PickSingleDeviceAsync(Rect, Placement)

Shows the picker UI and returns the selected device; does not require you to register for an event. The picker flies out from the specified edge of the specified rectangle.

public : IAsyncOperation<DeviceInformation> PickSingleDeviceAsync(Rect selection, Placement placement)public IAsyncOperation<DeviceInformation> PickSingleDeviceAsync(Rect selection, Placement placement)Public Function PickSingleDeviceAsync(selection As Rect, placement As Placement) As IAsyncOperation( Of DeviceInformation )// You can use this method in JavaScript.
Parameters
selection
Rect Rect Rect Rect

The rectangle from which you want the picker to fly out.

placement
Placement Placement Placement Placement

The edge of the rectangle from which you want the picker to fly out.

Returns
See Also

SetDisplayStatus(DeviceInformation, String, DevicePickerDisplayStatusOptions) SetDisplayStatus(DeviceInformation, String, DevicePickerDisplayStatusOptions) SetDisplayStatus(DeviceInformation, String, DevicePickerDisplayStatusOptions) SetDisplayStatus(DeviceInformation, String, DevicePickerDisplayStatusOptions)

Updates the picker UI to reflect the provided status and display options for a specified device.

public : void SetDisplayStatus(DeviceInformation device, PlatForm::String status, DevicePickerDisplayStatusOptions options)public void SetDisplayStatus(DeviceInformation device, String status, DevicePickerDisplayStatusOptions options)Public Function SetDisplayStatus(device As DeviceInformation, status As String, options As DevicePickerDisplayStatusOptions) As void// You can use this method in JavaScript.
Parameters
status
PlatForm::String String String String

The status to display.

Show(Rect) Show(Rect) Show(Rect) Show(Rect)

Shows the picker UI. The picker flies out from the edge of the specified rectangle.

public : void Show(Rect selection)public void Show(Rect selection)Public Function Show(selection As Rect) As void// You can use this method in JavaScript.
Parameters
selection
Rect Rect Rect Rect

The rectangle from which you want the picker to fly out.

See Also

Show(Rect, Placement) Show(Rect, Placement) Show(Rect, Placement) Show(Rect, Placement)

Shows the picker UI. The picker flies out from the specified edge of the specified rectangle.

public : void Show(Rect selection, Placement placement)public void Show(Rect selection, Placement placement)Public Function Show(selection As Rect, placement As Placement) As void// You can use this method in JavaScript.
Parameters
selection
Rect Rect Rect Rect

The rectangle from which you want the picker to fly out.

placement
Placement Placement Placement Placement

The edge of the rectangle from which you want the picker to fly out.

See Also

Events

DevicePickerDismissed DevicePickerDismissed DevicePickerDismissed DevicePickerDismissed

Indicates that the device picker was light dismissed by the user. Light dismiss happens when the user clicks somewhere other than the picker UI and the picker UI disappears.

public : event TypedEventHandler DevicePickerDismissed<DevicePicker,  object>public event TypedEventHandler DevicePickerDismissed<DevicePicker,  object>Public Event DevicePickerDismissed<DevicePicker,  object>// You can use this event in JavaScript.

DeviceSelected DeviceSelected DeviceSelected DeviceSelected

Indicates that the user selected a device in the picker.

public : event TypedEventHandler DeviceSelected<DevicePicker,  DeviceSelectedEventArgs>public event TypedEventHandler DeviceSelected<DevicePicker,  DeviceSelectedEventArgs>Public Event DeviceSelected<DevicePicker,  DeviceSelectedEventArgs>// You can use this event in JavaScript.

DisconnectButtonClicked DisconnectButtonClicked DisconnectButtonClicked DisconnectButtonClicked

Indicates that the user clicked or tapped the disconnect button for a device in the picker.

public : event TypedEventHandler DisconnectButtonClicked<DevicePicker,  DeviceDisconnectButtonClickedEventArgs>public event TypedEventHandler DisconnectButtonClicked<DevicePicker,  DeviceDisconnectButtonClickedEventArgs>Public Event DisconnectButtonClicked<DevicePicker,  DeviceDisconnectButtonClickedEventArgs>// You can use this event in JavaScript.

See Also