Skip to content

API review for new properties in Storage.Pickers - SuggestedDefaultFolder, FileTypeChoices#5771

Merged
DinahK-2SO merged 7 commits intomainfrom
user/Dinah/DefaultFolder_FileTypeChoices
Oct 4, 2025
Merged

API review for new properties in Storage.Pickers - SuggestedDefaultFolder, FileTypeChoices#5771
DinahK-2SO merged 7 commits intomainfrom
user/Dinah/DefaultFolder_FileTypeChoices

Conversation

@DinahK-2SO
Copy link
Copy Markdown
Contributor

@DinahK-2SO DinahK-2SO commented Aug 29, 2025

This is a design spec for adding new functionality to the Microsoft.Windows.Storage.Pickers APIs, including 2 main changes:

  1. the SuggestedFolder and SuggestedStartFolder properties for all three picker types,
  2. the new FileTypeChoices property for FileOpenPicker. The documentation and code samples are updated to reflect these changes, with detailed explanations of how each property affects picker behavior.

New and enhanced picker properties:

  • Added SuggestedFolder and SuggestedStartFolder properties to FileOpenPicker, FileSavePicker, and FolderPicker, allowing developers to control both the persistent and initial folder shown when the picker dialog opens. [1] [2] [3] [4] [5] [6]
  • Updated documentation and code samples to demonstrate usage and precedence rules for SuggestedFolder and SuggestedStartFolder, including detailed comments and a new explanatory note on their differences and interaction with user navigation history. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

File type filtering improvements:

  • Introduced the FileTypeChoices property to FileOpenPicker, enabling grouped and labeled file type filters in the picker dialog. When both FileTypeChoices and FileTypeFilter are set, FileTypeChoices takes precedence. [1] [2] [3] [4] [5]

Documentation and API clarification:

  • Expanded API documentation to clarify the behaviors and precedence of the new properties, including a note distinguishing SuggestedFolder (persistent folder) from SuggestedStartFolder/SuggestedStartLocation (initial folder before user navigation). [1] [2]
  • Updated conceptual and migration notes to highlight the new properties and their intended scenarios, such as supporting persistent folder selection across picker sessions. [1] [2]

These changes make it much easier to control folder selection behavior in desktop apps, provide better user experiences, and support more advanced filtering scenarios.

@DinahK-2SO DinahK-2SO changed the title API review for new properties in Storage.Pickers API review for new properties in Storage.Pickers - SuggestedDefaultFolder, FileTypeChoices Aug 29, 2025
Copy link
Copy Markdown
Member

@kmahone kmahone left a comment

Choose a reason for hiding this comment

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

:shipit:

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

Hi @kmahone and API reviewers,

Good day! I came across a request (#5836 comment-3291107774) for the SuggestedFolder functionality in the open picker too (currently, this property is only available in the save picker). To address this need, I’m adding the SuggestedFolder property in both FileOpenPicker and FolderPicker.

Please take a moment to review the updated proposal when you get a chance - your feedback is much appreciated!


- `SuggestedFolder` sets the path that will always be tried when opening the picker, regardless of
the user's previous operations. This uses the [SetFolder](https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setfolder)
method of the underlying COM APIs and takes precedence over any user navigation history.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This was discussed before, but I'm forgetting the details. If the SuggestedFolder exists, are SuggestedStartFolder and SuggestedStartLocation both ignored/unused?

DinahK-2SO added a commit that referenced this pull request Oct 4, 2025
…Folder, FileTypeChoices (#5772)

This pull request introduces new experimental features to the Windows Storage Pickers API, including:
- Introducing a new property, SuggestedStartFolder, across all storage pickers (FileOpenPicker, FileSavePicker, FolderPicker). This property sets a string-type path that appears the first time the picker is launched.
- Adding FileTypeChoices in FileOpenPicker - expanding its availability beyond just FileSavePicker.
- Adding SuggestedFolder in both FileOpenPicker and FolderPicker, expanding its availability beyond just FileSavePicker.

More design details can be found in the design spec (#5771)
@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@DinahK-2SO DinahK-2SO merged commit d87efca into main Oct 4, 2025
2 checks passed
@DinahK-2SO DinahK-2SO deleted the user/Dinah/DefaultFolder_FileTypeChoices branch October 4, 2025 04:23
@Marv51
Copy link
Copy Markdown
Contributor

Marv51 commented Oct 15, 2025

Just curious, do the changes to FileTypeChoices here already address #5827?

Basically, the developer seems to have no control over the order and the default selection of FileTypeChoices in FileSavePicker, which is a regression from the WinRT pickers.

@DinahK-2SO
Copy link
Copy Markdown
Contributor Author

Just curious, do the changes to FileTypeChoices here already address #5827?

Basically, the developer seems to have no control over the order and the default selection of FileTypeChoices in FileSavePicker, which is a regression from the WinRT pickers.

Thanks @Marv51 for reporting this issue. It hasn’t been resolved yet. It is being looked into and I will share updates as soon as we have them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants