Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 3.74 KB

RemoteDevicePicker.md

File metadata and controls

77 lines (56 loc) · 3.74 KB
title author description keywords dev_langs
RemoteDevicePicker
avknaidu
The RemoteDevicePicker control helps you to pick a device that you can use to Remote Launch Apps, Services.
windows 10, uwp, windows community toolkit, uwp community toolkit, uwp toolkit, RemoteDevicePicker, picker
csharp

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.

[!div class="nextstepaction"] Try it in the sample app

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

API

Related Topics