RemoteDevicePicker
The RemoteDevicePicker gives you a list of Remote Systems. All the systems must be signed in with the same Microsoft Account (MSA)
Important
Make sure you enable the RemoteSystem capability in your app's package.appxmanifest
to access remote system information.
Syntax
RemoteDevicePicker remoteDevicePicker = new RemoteDevicePicker()
{
Title = "Pick Remote Device",
SelectionMode = RemoteDevicesSelectionMode.Multiple
};
var result = await remoteDevicePicker.PickDeviceAsync();
await new MessageDialog($"You picked {result.Count.ToString()} Device(s)" + Environment.NewLine + string.Join(",", result.Select(x => x.DisplayName.ToString()).ToList())).ShowAsync();
You can also use default filter types for initializing. Like Below.
RemoteDevicePicker remoteDevicePicker = new RemoteDevicePicker(RemoteSystemDiscoveryType.Proximal, RemoteSystemAuthorizationKind.Anonymous, RemoteSystemStatusType.Any)
{
Title = "Pick Remote Device",
SelectionMode = RemoteDevicesSelectionMode.Multiple
};
var remoteSystems = await remoteDevicePicker.PickDeviceAsync();
await new MessageDialog($"You picked {remoteSystems.Count().ToString()} Device(s)" + Environment.NewLine + string.Join(",", remoteSystems.Select(x => x.DisplayName.ToString()).ToList())).ShowAsync();
Properties
Property | Type | Description |
---|---|---|
SelectionMode | RemoteDevicesSelectionMode | Gets or sets the DeviceList Selection Mode. Defaults to RemoteDevicesSelectionMode.Single |
ShowAdvancedFilters | Boolean | Gets or sets a value indicating whether Advanced Filters are visible or not. Defaults to false |
Sample Project
RemoteDevicePicker Sample Page Source. You can see this in action in the Windows Community Toolkit Sample App.
Default Template
RemoteDevicePicker XAML File is the XAML template used in the toolkit for the default styling.
Requirements
Device family | Universal, 10.0.16299.0 or higher |
---|---|
Namespace | Microsoft.Toolkit.Uwp.UI.Controls |
NuGet package | Microsoft.Toolkit.Uwp.UI.Controls |