Skip to content

Conversation

@DinahK-2SO
Copy link
Contributor

@DinahK-2SO DinahK-2SO commented Dec 3, 2025

This pull request updates the Storage.Pickers API specifications and documentation to add new customization and usability features to the FileOpenPicker, FileSavePicker, and FolderPicker classes. The changes introduce properties for dialog title and persistent settings, allow specifying the default file type filter, and add support for picking multiple folders. These enhancements are reflected in both the API definitions and usage examples.

Adding properties:

Title

  • Added Title properties to FileOpenPicker, FileSavePicker, and FolderPicker, enabling custom dialog titles and persistent picker state across sessions. ([1], [2], [3], [4], [5], [6])

Related:

SettingsIdentifier

  • Added SettingsIdentifier properties to FileOpenPicker, FileSavePicker, and FolderPicker, enabling custom dialog titles and persistent picker state across sessions. ([1], [2], [3], [4], [5], [6])

Related:

FileTypeIndex

  • Added FileTypeIndex property to FileOpenPicker and FileSavePicker, allowing developers to set the default selected file type filter by index (1-based). This is documented and shown in usage examples. ([1], [2], [3], [4], [5], [6], [7], [8])

Related:

FileSavePicker.ShowOverwritePrompt & FileSavePicker.CreateNewFileIfNotExists

  • Added 2 new properties for FileSavePicker: ShowOverwritePrompt and CreateNewFileIfNotExists.
    • ShowOverwritePrompt default to true and control whether the picker warns about overwriting when user picked an existing file via FileSavePicker.
    • CreateNewFileIfNotExists default to true and control whether to auto-create an empty file when the picked file doesn't exists.

Related:

Adding method:

FolderPicker.PickMultipleFoldersAsync

  • Added PickMultipleFoldersAsync method to FolderPicker, enabling selection of multiple folders in a single operation. API definitions, documentation, and code samples have been updated to reflect this feature. ([1], [2], [3]`)

Related:

@DinahK-2SO DinahK-2SO force-pushed the user/DinahK-2SO/spec_settingsidentifier_filetypefilterindex_title branch from e8f4450 to 7af6a89 Compare December 4, 2025 08:00
@ghost1372
Copy link
Contributor

@DinahK-2SO
here is other related issues which can be closed:
#5847
#5827

@DinahK-2SO DinahK-2SO changed the title Official API Review for new functionalities of Storage.Pickers: SettingsIdentifier; FileTypeIndex; Title; FolderPicker.PickMultipleFoldersAsync Official API Review for new functionalities of Storage.Pickers: SettingsIdentifier; FileTypeIndex; Title; PickMultipleFoldersAsync; ShowOverwritePrompt; CreateNewFileIfNotExists Dec 4, 2025
catagorized filter types. When both `FileTypeChoices` and `FileTypeFilter` are provided,
`FileTypeChoices` is used and `FileTypeFilter` is ignored.

1. Adding `FileTypeIndex` for `FileOpenPicker` and `FileSavePicker`. This allows setting the default selected file type filter index. Note this index is 1-based. When it is 0 (the default value), the selected filter might be override by the API's default behavior.
Copy link

Choose a reason for hiding this comment

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

It would be friendlier to developer to use 0-based index (-1 for default behavior), it will save lots of time where they assume the "index" was always 0-based.
Are there any issues with the 0-based index?

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

Labels

area-File access Topics related to Microsoft.Windows.Storage.Pickers APIs for selecting files/folders etc. needs-triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants