Поделиться через


PickerLocationId Enum

Definition

Specifies the default folder or library that a picker starts from or displays to the user.

public enum class PickerLocationId
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Storage.Pickers.StoragePickersContract, 65544)]
enum class PickerLocationId
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Storage.Pickers.StoragePickersContract), 65544)]
public enum PickerLocationId
var value = Microsoft.Windows.Storage.Pickers.PickerLocationId.documentsLibrary
Public Enum PickerLocationId
Inheritance
PickerLocationId
Attributes

Fields

Name Value Description
DocumentsLibrary 0

The user's Documents library.

This is the default location where many applications save documents, and it is often mapped to the %USERPROFILE%\Documents folder on the user's system. If the user has configured OneDrive for documents, this location would be redirected to a OneDrive folder, such as %USERPROFILE%\OneDrive - ...\Documents.

ComputerFolder 1

The value represents the "This PC" directory.

This location provides access to all drives and devices connected to the user's computer, including internal and external storage devices.

Desktop 2

This value represents the user's Desktop.

This is the location where users often save shortcuts, files, and folders for quick access. It is often mapped to %USERPROFILE%\Desktop.

Downloads 3

This value represents the user's Downloads folder.

This is the default location where web browsers and other applications save downloaded files. It is often mapped to %USERPROFILE%\Downloads.

MusicLibrary 5

This value represents the user's Music library.

This is the default location where many applications save music files, and it's often mapped to %USERPROFILE%\Music. If the user has configured OneDrive for the music library, this location would be redirected to a OneDrive folder, such as %USERPROFILE%\OneDrive - ...\Music.

PicturesLibrary 6

This value represents the user's Pictures library.

This is the default location where many applications save image files, and it's often mapped to %USERPROFILE%\Pictures. If the user has configured OneDrive for the pictures library, this location would be redirected to a OneDrive folder, such as %USERPROFILE%\OneDrive - ...\Pictures.

VideosLibrary 7

This value represents the user's Videos library.

This is the default location where many applications save video files, and it's often mapped to %USERPROFILE%\Videos. If the user has configured OneDrive for the videos library, this location would be redirected to a OneDrive folder, such as %USERPROFILE%\OneDrive - ...\Videos.

Objects3D 8

This value represents the 3D Objects folder. This is the default location where many applications save 3D object files, and it's often mapped to %USERPROFILE%\3D Objects.

This enum value is retained for backward compatibility with the Windows.Storage.Pickers.PickerLocationId. It may be removed in future SDK releases.

Note

This location is being phased out, so it's recommended to avoid using this value.

Unspecified 9

This value represents an unspecified location.

When this value is used, the file picker will use the system default location, which may vary depending on the user's configuration and the context in which the picker is used.

When the SuggestedStartLocation was not specified in FileOpenPicker, FileSavePicker, or FolderPicker, the default value is PickerLocationId.Unspecified.

Applies to