0
var filePicker = new FileOpenPicker();
filePicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
filePicker.ViewMode = PickerViewMode.Thumbnail;
filePicker.FileTypeFilter.Clear();
filePicker.FileTypeFilter.Add(".jpg");
filePicker.FileTypeFilter.Add(".jpeg");
filePicker.FileTypeFilter.Add(".png");

var files = await filePicker.PickMultipleFilesAsync();

if (files != null)
{
    foreach (var file in files)
    {
        using (IRandomAccessStream fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read))
        {
            BitmapImage bitmapImage = new BitmapImage();
            bitmapImage.SetSource(fileStream);
            images.Add(bitmapImage);
        }
    }
}
flpView.ItemsSource = images;
loadTimer();

The code above is working. I can select multiple photos from local and facebook etc. also add the selected images to the flipview, but I want to store the image paths from local, skydrive and facebook images. I want this because when the application starts, the flipview should be automatically fill with the images from the paths. When there are no paths found it should be changed in settings charm. That's the idea. But integration of facebook is not required I think.

svick
  • 236,525
  • 50
  • 385
  • 514

1 Answers1

0

When opening files using the picker , what you get back is a storage file and not a traditional file. The difference is that storage files need not have a path associated with them.

Windows.Storage.AccessCache provides methods to cache storage items for future use.

http://blogs.msdn.com/b/wsdevsol/archive/2012/12/05/stray-from-the-path-stick-to-the-storagefile.aspx provides more information on this.