You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API review for new properties in Storage.Pickers - SuggestedDefaultFolder, FileTypeChoices (#5771)
This is a design spec for adding new functionality to the Microsoft.Windows.Storage.Pickers APIs, including 2 main changes:
- the SuggestedFolder and SuggestedStartFolder properties for all three picker types,
- the new FileTypeChoices property for FileOpenPicker.
Code implementation details can be found in (#5772)
Note: **Understanding SuggestedStartFolder/SuggestedStartLocation vs SuggestedFolder:**
171
+
172
+
These two kinds of properties have fundamentally different behaviors in terms of when and how they
173
+
affect the picker:
174
+
175
+
-`SuggestedFolder` sets the path that will always be tried when opening the picker, regardless of
176
+
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)
177
+
method of the underlying COM APIs and takes precedence over any user navigation history.
178
+
179
+
-`SuggestedStartFolder` sets the path shown only the first time the user launches the picker
180
+
(typically when the app is newly installed). After the user has picked a file, subsequent
181
+
launches of the picker will open to the user's last selected folder, and `SuggestedStartFolder`
182
+
becomes silent. This corresponds to the [SetDefaultFolder](https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setdefaultfolder)
183
+
method in the COM API.
184
+
185
+
The effective time span of `SuggestedStartFolder` is the same as that of `SuggestedStartLocation`,
186
+
both only influence the picker's initial behavior before user interaction establishes a
187
+
navigation history.
188
+
189
+
`SuggestedStartFolder` takes precedence over `SuggestedStartLocation` when both specified.
0 commit comments