DevicePickerWindow
Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
The shared device picker of every dialog that needs a set of devices (host and plugins, one window, never a copy): title bar, one card with the count and a search, Select all / Select none for the devices the search shows, and a virtualized list with a check box per device (address, model; a device that cannot be chosen is greyed with the reason), then Cancel / OK. With DevicePickerOptions a column on the left offers the device of the event, All devices, or Chosen devices and tags with the tag list (devices of a chosen tag show checked with the tag). Open it with DevicePickerWindow.ShowAsync; the view model is DevicePickerViewModel.
public sealed class DevicePickerWindow : WindowInherits Window
Guide: UI kit
Constructors
Section titled “Constructors”DevicePickerWindow
Section titled “DevicePickerWindow”DevicePickerWindow(DevicePickerViewModel viewModel)The window for viewModel; usually opened through the static ShowAsync methods.
Properties
Section titled “Properties”Heading
Section titled “Heading”string? Heading { get; set; }The window title (title bar and task switcher).
ViewModel
Section titled “ViewModel”DevicePickerViewModel ViewModel { get; }Its view model.
Methods
Section titled “Methods”ShowAsync
Section titled “ShowAsync”static Task<IReadOnlyList<Guid>?> ShowAsync(Window owner, IEnumerable<IDeviceInfo> devices, IEnumerable<Guid>? selected = null, Func<IDeviceInfo, string?>? unavailableReason = null, string heading = "Choose devices")Shows the picker over owner; returns the chosen devices (in list order), or null when cancelled.
ShowChoiceAsync
Section titled “ShowChoiceAsync”static Task<DeviceChoice?> ShowChoiceAsync(Window owner, IEnumerable<IDeviceInfo> devices, DeviceChoice initial, DevicePickerOptions options, string heading = "Choose devices")Shows the picker with all devices, tags and (with DevicePickerOptions.EventDeviceText) the device of the event; returns the choice, or null when cancelled.
ShowOneAsync
Section titled “ShowOneAsync”static Task<Guid?> ShowOneAsync(Window owner, IEnumerable<IDeviceInfo> devices, Guid? selected = null, Func<IDeviceInfo, string?>? unavailableReason = null, string heading = "Choose a device")Shows the picker for exactly one device (DevicePickerOptions.SingleDevice) over owner; returns its id, or null when cancelled or none was chosen.