Guidelines for file pickers

Applies to Windows and Windows Phone

The file picker allows an app to access files and folders and to save a file.

Dos and don'ts

  • Add a control to your app that calls the file picker to let the user pick files for your app to operate on.
  • 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.
  • Set the file types to ensure that users can pick or save only file types that your app can handle.
  • When accessing files or folders, set the view mode based on the kinds of items that the user is picking from.
  • Set the commit button text to match the user's current task.
  • Set the suggested start location to the most relevant location possible based on the user's current task.
  • When accessing files, let the user pick a single file or multiple files based on the current task.
  • When saving files, set a default file name for the file to save.
  • Don't use the file picker to explore, consume, or manage file content.
  • Don't use the file picker to save a file if a unique, user-specified file name or location is not needed.

Additional usage guidance

  • 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. A screen capture of the file picker with two files selected to be opened.

    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.

  • 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.

    A screen shot of a file picker used to save a file to OneDrive.

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.

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.

User experience guidelines: accessing and saving files and folders

  • 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.

  • 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.

  • 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".

  • 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.

  • 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.

  • 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.

Related topics

For designers
Integrating with file picker contracts
Guidelines for file picker contracts
For developers (HTML)
Accessing data and files
Adding controls and content
Quickstart: Accessing files with file pickers
How to save files through file pickers
Windows.Storage.Pickers
Windows.Storage.Pickers.Provider
Windows.Storage.AccessCache
PickerLocationId
FileSavePicker.SuggestedFileName
For developers (XAML)
Windows.Storage.Pickers
Windows.Storage.Pickers.Provider
Windows.Storage.AccessCache
PickerLocationId
FileSavePicker.SuggestedFileName

 

 

Show:
© 2014 Microsoft