Skip to content

Conversation

@moldypenguins
Copy link
Contributor

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

Copy link
Owner

@dotMorten dotMorten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@MartyIX
Copy link

MartyIX commented Apr 14, 2024

Not merged? :)

@moldypenguins
Copy link
Contributor Author

moldypenguins commented May 23, 2024

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;
    
  }

@dotMorten dotMorten merged commit 35e9edf into dotMorten:main Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants