WinUIEx icon indicating copy to clipboard operation
WinUIEx copied to clipboard

Update WindowExtensions.Dialogs.cs - Add CreateFolderPicker()

Open moldypenguins opened this issue 2 years ago • 2 comments

CreateFolderPicker() - Creates a new instance of a FolderPicker with the provided window as a parent.

moldypenguins avatar Mar 10 '24 03:03 moldypenguins

Not merged? :)

MartyIX avatar Apr 14 '24 17:04 MartyIX

Not merged? :)

This is what I have been using in the meantime:

  StorageFolder? programDataFolder;
  
  FolderPicker folderPicker = new FolderPicker();
  InitializeWithWindow.Initialize(folderPicker, App.MainWindow.GetWindowHandle());

  folderPicker.ViewMode = PickerViewMode.List;
  folderPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
  folderPicker.FileTypeFilter.Add("*");

  ProgramDataFolder = await folderPicker.PickSingleFolderAsync();
  if (ProgramDataFolder != null)
  {
    //use folder chosen
    App.ProgramDataFolder = ProgramDataFolder.Path;
    
  }

moldypenguins avatar May 23 '24 18:05 moldypenguins