Table of Contents

Class OpenFileDialogBuilder

Namespace
Artemis.UI.Shared.Services.Builders
Assembly
Artemis.UI.Shared.dll

Represents a builder that can create a Avalonia.Controls.OpenFileDialog.

public class OpenFileDialogBuilder
Inheritance
object
OpenFileDialogBuilder

Methods

HavingFilter(Action<FileDialogFilterBuilder>)

Add a filter to the dialog

public OpenFileDialogBuilder HavingFilter(Action<FileDialogFilterBuilder> configure)

Parameters

configure Action<FileDialogFilterBuilder>

Returns

OpenFileDialogBuilder

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

OpenFileDialogBuilder

WithDirectory(string?)

Set the initial directory of the dialog

public OpenFileDialogBuilder WithDirectory(string? directory)

Parameters

directory string

Returns

OpenFileDialogBuilder

WithTitle(string?)

Set the title of the dialog

public OpenFileDialogBuilder WithTitle(string? title)

Parameters

title string

Returns

OpenFileDialogBuilder