FilePickerRequest class
Namespace: Arlecchino.State · Assembly: Arlecchino
Everything the file picker needs for one round of picking. Unlike the modals, the picker is a view of its own, so the request also carries where to go once it is done.
public sealed class FilePickerRequest : IEquatable<FilePickerRequest>
Implements IEquatable<T><FilePickerRequest>
Constructors
| Member | Summary |
|---|---|
FilePickerRequest(string, bool, string, ViewRoute, Action<string>) | Everything the file picker needs for one round of picking. Unlike the modals, the picker is a view of its own, so the request also carries where to go once it is done. |
Properties
| Member | Summary |
|---|---|
FileFilter | Decides which files are worth showing, by full path. Folders are always listed, since they have to be walked through to reach anything. |
InitialPath | Where browsing starts. |
OnPicked | Called with the full path that was chosen. |
PickFolder | Whether a folder is being chosen rather than a file. |
Places | Shortcuts offered in the sidebar. |
ReturnView | The view to return to, whether anything was picked. |
Title | Heading shown above the listing. |
Methods
| Member | Summary |
|---|---|
Deconstruct(out string, out bool, out string, out ViewRoute, out Action<string>) |
Constructors in detail
FilePickerRequest(string, bool, string, ViewRoute, Action<string>)
public FilePickerRequest(
string Title,
bool PickFolder,
string InitialPath,
ViewRoute ReturnView,
Action<string> OnPicked);
Everything the file picker needs for one round of picking. Unlike the modals, the picker is a view of its own, so the request also carries where to go once it is done.
Parameters
| Name | Type | Description |
|---|---|---|
Title | string | Heading shown above the listing. |
PickFolder | bool | Whether a folder is being chosen rather than a file. |
InitialPath | string | Where browsing starts. |
ReturnView | ViewRoute | The view to return to, whether anything was picked. |
OnPicked | Action<T><string> | Called with the full path that was chosen. |
Properties in detail
FileFilter
public Func<string, bool>? FileFilter { get; init; }
Decides which files are worth showing, by full path. Folders are always listed, since they have to be walked through to reach anything.
Type Func<T, TResult><string, bool>
InitialPath
public string InitialPath { get; init; }
Where browsing starts.
Type string
OnPicked
public Action<string> OnPicked { get; init; }
Called with the full path that was chosen.
Type Action<T><string>
PickFolder
public bool PickFolder { get; init; }
Whether a folder is being chosen rather than a file.
Type bool
Places
public IReadOnlyList<FilePickerPlace> Places { get; init; }
Shortcuts offered in the sidebar.
Type IReadOnlyList<T><FilePickerPlace>
ReturnView
public ViewRoute ReturnView { get; init; }
The view to return to, whether anything was picked.
Type ViewRoute
Title
public string Title { get; init; }
Heading shown above the listing.
Type string
Methods in detail
Deconstruct(out string, out bool, out string, out ViewRoute, out Action<string>)
public void Deconstruct(
out string Title,
out bool PickFolder,
out string InitialPath,
out ViewRoute ReturnView,
out Action<string> OnPicked);
Parameters
| Name | Type | Description |
|---|---|---|
Title | string | |
PickFolder | bool | |
InitialPath | string | |
ReturnView | ViewRoute | |
OnPicked | Action<T><string> |