0

I am trying to set suggested location for FileOpenPicker. Here is how i did this:

var openPicker = new FileOpenPicker();
openPicker.SuggestedStartLocation = PickerLocationId.Downloads;
openPicker.FileTypeFilter.Add("*");

It working fine on WinRT and i getting directly Downloads folder. But on windows phone it's don't working. Instead of getting Downloads its showing list of default folders to pick. After some time fixing this problem i found, if i'll set FileTypeFilter like that:

var openPicker = new FileOpenPicker();
openPicker.SuggestedStartLocation = PickerLocationId.MusicLibrary;
openPicker.FileTypeFilter.Add(".jpg");

it will open PictureLibrary. Funny thing, it don't metter what i setting to SuggestedStartLocation, it will be always PictureLibrary. Has someone faced this problem before? I will be appreciate for any advice!

RenDishen
  • 928
  • 1
  • 10
  • 30

1 Answers1

0

SuggestedStartLocation is just that -- a suggestion. You can't use it to force the file picker to open a certain location. For example if the user navigated to another location previously and opened a file there, the file picker will start there. A little problematic for testing, but actually very intuitive for the user.

scripter
  • 75
  • 2
  • 12