Skip to content
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

Public Spec for Microsoft.Windows.Storage.Pickers #5155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DinahK-2SO
Copy link
Contributor

The public Spec for Microsoft.Windows.Storage.Pickers

Preview: Microsoft.Windows.Storage.Pickers.md

| **Attribute** | **Type** | **Description** |
|--------------------------|---------------------------------------------------------|--------------------------------------------------------------------------|
| `ViewMode` | [Microsoft::Windows::Storage::Pickers::PickerViewMode](./PickerViewMode.md) | Gets or sets the view mode that the file picker is using to present items. |
| `SuggestedStartLocation` | [Microsoft::Windows::Storage::Pickers::PickerLocationId](./PickerLocationId.md)| Gets or sets the initial location where the file picker looks for files. |

Choose a reason for hiding this comment

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

Is there a chance SuggestedStartLocationDirectory will be added, where you can provide any string file path (e.g. if SuggestedStartLocation == PickerLocationId.Unspecified)? (see #4942 (comment))

It would be a bummer if this limitation, that only applies to the UWP picker and UWP apps and not the COM picker, would be retained. From history, if it's not being addressed now, it will forever stay like that :/

Copy link

Choose a reason for hiding this comment

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

btw: It's certainly a feature that would be much appreciated as @whiskhub said. There is a quite popular issue dotnet/maui#9212 on the MAUI side asking for this feature. A person did a great research into it here.

Choose a reason for hiding this comment

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

I agree, a SuggestedStartLocationDirectory would be very useful. If you don't implement that, please at least implement the SettingsIdentifier, otherwise the start location will be even less customizable than in UWP.

@benstevens48
Copy link

Is the general principle in WindowsAppSDK to continue using the StorageFile and StorageFolder types? I mean if writing in C#, using the .Net IO functions is more convenient, in which case it's preferable just to have file paths and not have the overhead of the StorageFile/Folder instances. However, I have to admit, I'm not full up to date with all the possible security models that can be used with WindowsAppSDK, so maybe there's a reason for using StorageFile and StorageFolder instead of just returning the file path?

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.

4 participants