0

Example code where OpenFileDialog saves selected directory to list:

OpenFolderDialog dialog = new OpenFolderDialog();
var result = await dialog.ShowAsync(this);
ListOfDirectories.Add(result);

But the problem is that user might want to select two, or three, or any other amount of directories. With this implementation user has to do this in loop. OpenFileDialog does not support multiselection directly.

There is also OpenFileDialog which has multiselect property, but as name suggests its for files, I need it only for folders.

Currently I do not have any ideas how to bypass this problem.

  • 1
    As Avalonia wraps over native system dialogs and those native dialogs might not support multiple selection of folders (like the Windows one, https://stackoverflow.com/questions/12261598/browse-multiple-folders-using-folderbrowserdialog-in-windows-application) you won't easily get this feature without using your own dialogs. – Lex Li May 21 '22 at 23:00
  • @LexLi thanks for reply. Thats a little problematic but with some luck someone might already did it. –  May 22 '22 at 12:24

0 Answers0