Class OpenFileDialogBuilder
Represents a builder that can create a Avalonia.Controls.OpenFileDialog.
public class OpenFileDialogBuilder
- Inheritance
-
objectOpenFileDialogBuilder
Methods
HavingFilter(Action<FileDialogFilterBuilder>)
Add a filter to the dialog
public OpenFileDialogBuilder HavingFilter(Action<FileDialogFilterBuilder> configure)
Parameters
configureAction<FileDialogFilterBuilder>
Returns
ShowAsync()
Asynchronously shows the file dialog.
public Task<string[]?> ShowAsync()
Returns
- Task<string[]>
A task that on completion returns an array containing the full path to the selected files, or null if the dialog was canceled.
WithAllowMultiple()
Indicate that the user can select multiple files.
public OpenFileDialogBuilder WithAllowMultiple()
Returns
WithDirectory(string?)
Set the initial directory of the dialog
public OpenFileDialogBuilder WithDirectory(string? directory)
Parameters
directorystring
Returns
WithTitle(string?)
Set the title of the dialog
public OpenFileDialogBuilder WithTitle(string? title)
Parameters
titlestring