Sdílet prostřednictvím


Windows.Storage.Pickers Namespace

Provides classes for creating and managing user interface (UI) elements that let the user browse files, choose files to open, and to choose the name, extension, and location when storing files.

Classes

FileExtensionVector

Represents a random-access collection of file name extensions.

FileOpenPicker

Represents a UI element that lets the user choose and open files.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

FilePickerFileTypesOrderedMap

Represents a collection of display names mapped to the associated file types (extensions). Each element in this collection maps a display name to a corresponding collection of file name extensions. The key is a single string, the value is a list/vector of strings representing one or more extension choices.

FilePickerSelectedFilesArray

Represents a collection of storage files that the user has selected by using a file picker.

FileSavePicker

Represents a file picker that lets the user choose the file name, extension, and storage location for a file.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

FolderPicker

Represents a UI element that lets the user choose folders.

In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on CoreWindow.

Enums

PickerLocationId

Identifies the storage location that the file picker presents to the user.

PickerViewMode

Indicates the view mode that the file picker is using to present items.

Examples

Tip

For more info, design guidance, and code examples, see Open files and folders with a picker.

The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality. Get the app from the Microsoft Store or get the source code on GitHub

See also