Guidelines for file pickers(Windows Store apps)
Follow these guidelines to customize the file picker when you use the file picker to access files and folders or when you use the file picker to save files.
Access files and folders.
Add a control to your app that calls the file picker to let the user pick files for your app to operate on. The user can then pick files through the file picker's UI as shown in the screen shot.
For example, this screen shot shows a file picker that was called to let the user choose some files. In the screen shot, the user has selected two files.
The user can pick files from any location (including from other apps) that is listed in the drop-down list at the upper left in the file picker.
To learn more about using file pickers to access files and folders, see Quickstart: Accessing files with file pickers.
Add "save as" to your app.
Add a control to your app's UI that calls the file picker so that the user can specify the name, file type, and/or save location (like another app) of the file to save. The user can then navigate and save their file through the file picker's UI, as shown in the screen shot. Learn more about calling the file picker to save a file in How to save files through file pickers.
To learn about adding controls, see Adding controls and content.
Don't use the file picker to explore, consume, or manage file content.
Instead, we recommend that you let users explore, consume, and/or manage file content by creating dedicated pages and UI in your app. This helps users focus on their current task and helps ensure that when users pick files, their experience is uncluttered by unnecessary functionality.
For example, a photo gallery app should provide a customized, dedicated page and UI that lets users organize and view picture files within the app. The app can then customize this UI to best suit the user’s needs. When the user wants to add files to the gallery, it would call the file picker which provides an experience that is specialized for picking.
Don't use the file picker to save a file if a unique, user-specified file name or location is not needed.
If the user doesn't have to specify a file name, file type, or location to save to, we recommend that your app save the file automatically in the background (without launching a file picker). This helps eliminate unnecessary user interaction, making the process of saving a file faster and less intrusive.
Set the file types to ensure that users can pick or save only file types that your app can handle.
Whether picking or saving files and folders, customize the file picker to display only the file types that your app supports and that are relevant to the user’s current task. For example, if the user is picking or saving a video, set the file types so that the user can select or save only a video file that uses a format that your app can handle.
This also applies to folder picking where the user is using files displayed in the file picker to help them determine which folder to select. By filtering the view to the proper file type, you help the user identify the correct folder faster.
When accessing files or folders, set the view mode based on the kinds of items that the user is picking from.
If the user is picking pictures or videos, set the view mode to Thumbnail. If the user is picking any other kind of files or folders, set the view mode to List.
In some cases, the user may want to pick a picture/video or any other kind of file (for example, if the user is picking a file to attach to an email or to send via IM). In this case, you should support both view modes by adding two UI controls to your app. One control should call the file picker using the Thumbnail view mode so the user can pick pictures and videos and the other should call the file picker using the List view mode so that the user can pick other kinds of files. For example, a mail app would have two buttons: Attach Picture or Video and Attach Document.
Set the commit button text to match the user's current task.
Whether picking or saving files and folders, customize the file picker by setting the commit button text appropriately for the user's current task. For example, if the user wants to pick a set of files to upload to your app, set the commit button text to "Upload".
Set the suggested start location to the most relevant location possible based on the user's current task.
Whether picking or saving files and folders, customize the file picker to suggest the most relevant start location possible based on the user's current task and the list of possible start locations provided by the PickerLocationId enumeration. For example, if the user is picking pictures, you may want to set the suggested start location to the user’s Pictures.
When accessing files, let the user pick a single file or multiple files based on the current task.
For example, if the user is picking a profile picture, call the file picker for picking a single file. If the user is picking photos to send to a friend, call the file picker for picking multiple files.
When saving files, set a default file name for the file to save.
If the user accepts the default file name that you provide, they won't have to take the time to enter a different name and they can complete the "save as" task faster. You can use the FileSavePicker.SuggestedFileName property to set the default file name.
- Accessing data and files
- Adding controls and content
- Quickstart: Accessing files with file pickers
- How to save files through file pickers
- File picker contracts
- Integrating with file picker contracts
- Guidelines for file picker contracts
Build date: 11/16/2013