API review for new properties in Storage.Pickers - SuggestedDefaultFolder, FileTypeChoices#5771
Conversation
|
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.
This was discussed before, but I'm forgetting the details. If the SuggestedFolder exists, are SuggestedStartFolder and SuggestedStartLocation both ignored/unused?
…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)
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
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. |
This is a design spec for adding new functionality to the
Microsoft.Windows.Storage.PickersAPIs, including 2 main changes:SuggestedFolderandSuggestedStartFolderproperties for all three picker types,FileTypeChoicesproperty 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:
SuggestedFolderandSuggestedStartFolderproperties 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]SuggestedFolderandSuggestedStartFolder, 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:
FileTypeChoicesproperty toFileOpenPicker, enabling grouped and labeled file type filters in the picker dialog. When bothFileTypeChoicesandFileTypeFilterare set,FileTypeChoicestakes 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.