Organizational Research By

Surprising Reserch Topic

Select all files with file picker metro apps windows 8

FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.Thumbnail;
openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;

StorageFile file = await openPicker.PickSingleFileAsync();
if (file != null)
    // Application now has read/write access to the picked file
    OutputTextBlock.Text = "Picked photo: " + file.Name;
    OutputTextBlock.Text = "Operation cancelled.";

How do I add openPicker.FileTypeFilter.Add(".*"); means show all file types in file picker?


asked Sep 13, 2013 in Microsoft Window 8 by rajesh
edited Sep 12, 2013
0 votes

Related Hot Questions

1 Answer

0 votes
3 down vote accepted You are almost there.. the correct syntax is openPicker.FileTypeFilter.Add("*"); From the FileTypeFilter documentation: The File picker sample demonstrates how to show files of any type in the file picker for the user to pick from. Where the code from the sample: FileOpenPicker openPicker = new FileOpenPicker(); openPicker.ViewMode = PickerViewMode.List; openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; openPicker.FileTypeFilter.Add("*");
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013