Search code examples
c#win-universal-appwindows-10-universalwindows-8.1-universalfileopenpicker

Save FolderPicker location for next time in windows 10 universal apps c#


I am getting file by using FolderPicker from device, by using this below code.

FolderPicker pk = new FolderPicker();

        pk.SuggestedStartLocation = PickerLocationId.Downloads;
        pk.ViewMode = PickerViewMode.Thumbnail;
        pk.FileTypeFilter.Add("*");

        var folder = await pk.PickSingleFolderAsync();

        var files =await folder.GetFilesAsync();

        foreach (var files in files)
        {

        }

For each time i have to pick the folder location, for that reason i want to save the folder location first time, when i open app next time get the file from that path, any one please help me to achieve this.

Thank you,


Solution

  • I found the answer in MSDN forms https://social.msdn.microsoft.com/Forums/windowsapps/en-US/b5a23a11-f526-4a59-bcca-af6a563589d9/save-folderpicker-location-for-next-time-in-windows-10-universal-apps-c?forum=wpdevelop