Skip to content

Conversation

DinahK-2SO
Copy link
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
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
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
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?

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.

5 participants