FolderPicker.PickSingleFolderAsync FolderPicker.PickSingleFolderAsync FolderPicker.PickSingleFolderAsync FolderPicker.PickSingleFolderAsync FolderPicker.PickSingleFolderAsync Method

Definition

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.

public : IAsyncOperation<StorageFolder> PickSingleFolderAsync()
IAsyncOperation<StorageFolder> PickSingleFolderAsync() const;
public IAsyncOperation<StorageFolder> PickSingleFolderAsync()
Public Function PickSingleFolderAsync() As IAsyncOperation(Of StorageFolder)
Windows.Storage.Pickers.FolderPicker.pickSingleFolderAsync().done( /* Your success and error handlers */ );

Returns

When the call to this method completes successfully, it returns a storageFolder object that represents the folder that the user picked.

Remarks

Warning

If you try to show the file picker while your app is snapped the file picker will not be shown and an exception will be thrown. You can avoid this by making sure your app is not snapped or by unsnapping it before you call the file picker. The FolderPicker code examples and the File picker sample show you how.

See also