Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WindowExtensions.Dialogs.cs - Add CreateFolderPicker() #167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moldypenguins
Copy link

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

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