-
Notifications
You must be signed in to change notification settings - Fork 351
[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
base: main
Are you sure you want to change the base?
Conversation
…estedSaveFile/Name functionalities
…4945) Creating new API Microsoft.Windows.Storage.Pickers.FileOpenPicker.PickSingleFileAsync
{ | ||
m_settingsIdentifier = value; | ||
} | ||
winrt::Microsoft::Storage::Pickers::PickerLocationId FileOpenPicker::SuggestedStartLocation() |
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.
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.
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.
@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.
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. |
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. |
typo? also, |
GitHub eats the brackets 😩 I meant it returns an IReadOnlyList of PickFileResult instead of an IReadOnlyList of StorageFile. |
NOTE This is a draft PR for discussion, not for code review for production