FolderPicker Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public ref class FolderPicker sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class FolderPicker final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class FolderPicker final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FolderPicker final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class FolderPicker
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class FolderPicker
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class FolderPicker
function FolderPicker()
Public NotInheritable Class FolderPicker
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Remarks
To get started accessing files and folders with a picker, see Open files and folders with a picker.
Version history
Windows version | SDK version | Value added |
---|---|---|
1903 | 18362 | CreateForUser |
1903 | 18362 | User |
Constructors
FolderPicker() |
Creates a new instance of a FolderPicker. 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. |
Properties
CommitButtonText |
Gets or sets the label text of the folder picker's commit button. |
ContinuationData |
Gets a set of values to be populated by the app before a PickFolderAndContinue operation that deactivates the app in order to provide context when the app is activated. (Windows Phone 8.x app) |
FileTypeFilter |
Gets the collection of file types that the folder picker displays. |
SettingsIdentifier |
Gets or sets the settings identifier associated with the with the current FolderPicker instance. |
SuggestedStartLocation |
Gets or sets the initial location where the folder picker looks for folders to present to the user. |
User |
Gets info about the user for which the FolderPicker was created. Use this property for multi-user applications. |
ViewMode |
Gets or sets the view mode that the folder picker uses to display items. |
Methods
CreateForUser(User) |
Creates a FolderPicker that is scoped to the personal directory of the specified user. Use this method for multi-user applications. |
PickFolderAndContinue() |
Obsolete as of Windows 10; use PickSingleFolderAsync instead. Shows the file picker so that the user can pick a folder, deactivating and the app and reactivating it when the operation is complete. (Windows Phone 8.x app) |
PickSingleFolderAsync() |
Shows the folderPicker object so that the user can pick a folder. (UWP app) Note You must specify the FileTypeFilter before calling this method, or it will throw an exception. To list all folders, use "*" as the filter. |