-
Notifications
You must be signed in to change notification settings - Fork 389
API review for new properties in Storage.Pickers - SuggestedDefaultFolder, FileTypeChoices #5771
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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. |
There was a problem hiding this comment.
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?
This is a design spec for adding new functionality to the
Microsoft.Windows.Storage.Pickers
APIs, including 2 main changes:SuggestedFolder
andSuggestedStartFolder
properties for all three picker types,FileTypeChoices
property forFileOpenPicker
. 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:
SuggestedFolder
andSuggestedStartFolder
properties toFileOpenPicker
,FileSavePicker
, andFolderPicker
, allowing developers to control both the persistent and initial folder shown when the picker dialog opens. [1] [2] [3] [4] [5] [6]SuggestedFolder
andSuggestedStartFolder
, 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:
FileTypeChoices
property toFileOpenPicker
, enabling grouped and labeled file type filters in the picker dialog. When bothFileTypeChoices
andFileTypeFilter
are set,FileTypeChoices
takes precedence. [1] [2] [3] [4] [5]Documentation and API clarification:
SuggestedFolder
(persistent folder) fromSuggestedStartFolder
/SuggestedStartLocation
(initial folder before user navigation). [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.