Skip to content

ServerFolderWindow

Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll

The dialog of ServerFolderPicker: a folder on the server’s computer, never the local folder dialog (the client may run on another computer). Title bar, one card with Up, Drives and New folder, the path bar (Enter opens a typed path; the open folder’s check or a refusal below it), the inline New folder name with Create and Cancel, the virtualized list of subfolders (double click or Enter opens) with the loading overlay while it reads, then Cancel and the primary Choose for the open folder. Open it with ServerFolderWindow.ShowAsync; the view model is ServerFolderPickerViewModel.

public sealed class ServerFolderWindow : Window

Inherits Window

ServerFolderWindow(ServerFolderPickerViewModel viewModel)

The window for viewModel; usually opened through ServerFolderWindow.ShowAsync.

Button ChooseButton { get; }

The main button of the footer.

Button CreateButton { get; }

Create of the New folder editor (tests).

string? Heading { get; set; }

The window title (title bar and task switcher).

ListBox List { get; }

The folder list (tests).

LoadingOverlay Loading { get; }

The loading overlay of the list (tests).

TextBox NameBox { get; }

The name of a new folder (tests).

Button NewFolderButton { get; }

New folder (tests).

TextBox PathBox { get; }

The path bar (tests).

ServerFolderPickerViewModel ViewModel { get; }

Its view model.

static Task<string?> ShowAsync(Window owner, IServerFolders folders, string? startPath = null, string? heading = null)

Shows the dialog over owner, opened on startPath (else the drives); returns the chosen folder’s full path on the server, or null when cancelled.

const string DefaultHeading = "Choose a folder on the server"

The title when the caller gives none.