Table of Contents

Method SelectFile

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SelectFile(Action<string>, string?)

Displays a file selection dialog and invokes the specified callback with the selected file's path.

public static void SelectFile(Action<string> onSelectFile, string? filter = null)

Parameters

onSelectFile Action<string>

A callback to be invoked with the full path of the selected file.

filter string

The value for Filter property. If not specified, FileDialogFilterAllFiles is used.

Remarks

The dialog enforces that the selected file must exist and allows only a single file to be selected. The file filter is set to display all files.