Skip to content

[DRAFT PR] Storage Pickers Prototype PR for Dicussion #4942

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Hong-Xiang
Copy link
Contributor

NOTE This is a draft PR for discussion, not for code review for production

{
m_settingsIdentifier = value;
}
winrt::Microsoft::Storage::Pickers::PickerLocationId FileOpenPicker::SuggestedStartLocation()

Choose a reason for hiding this comment

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

As a WinUI 3 developer, I would appreciate it if we could provide any file path here. I understand that the goal is to keep it similar to the WinRT API, but the COM file picker doesn't have this limitation.
Maybe by adding an additional SuggestedStartLocationDirectory that takes precedence if not set to null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@whiskhub thank you for your suggestions. SuggestedStartLocation is one of the features currently under discussion. While the final API design, behavior, and release have not been finalized yet, we are actively working on trying to add it.

@sungaila
Copy link

sungaila commented Dec 20, 2024

A file/folder picker that works for both packaged and unpackaged apps, elevated as admin or not, and inside an AppContainer or not ... that would be a dream come true.

Finally a chance to fix the current mess in the Windows App SDK.

Base automatically changed from user/xianghong/storage-pickers-develop to main March 26, 2025 04:40
@eduardobragaxz
Copy link

Why return something like PickFileResult instead of StorageFile? StorageFile is a lot more conveniant. If all you need is the path, the StorageFile already contains that, but if you need other properties you then have to do StorageFile.GetFileFromPathAsync. It can be a little cumbersome, specially when calling fileOpenPicker.PickMultipleFilesAsync(). It returns an IReadOnlyList instead of an IReadOnlyList.

@mominshaikhdevs
Copy link

mominshaikhdevs commented Apr 17, 2025

...It returns an IReadOnlyList instead of an IReadOnlyList.

typo?

also,

@eduardobragaxz
Copy link

...It returns an IReadOnlyList instead of an IReadOnlyList.

typo?

also,

GitHub eats the brackets 😩

I meant it returns an IReadOnlyList of PickFileResult instead of an IReadOnlyList of StorageFile.

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