Take the 2-minute tour ×

How do i make a open file dialog in xaml 2012 as i am new to metro style. I know c# 2010 there there is an option of open file dialog here there is no option so how can i make a open file dialog can anyone suggest me how to do it?

Thank You.

share|improve this question
add comment

1 Answer

In a metro style app (WinRT), you would use the FileOpenPicker class for this purpose. Here's an example:

            var filePicker = new FileOpenPicker();
            filePicker.ViewMode = PickerViewMode.Thumbnail;
            filePicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
            filePicker.SettingsIdentifier = "PicturePicker";
            filePicker.CommitButtonText = "Select Files";

            var selectedFiles = await filePicker.PickMultipleFilesAsync();
            if (selectedFiles != null)
                // do something with the selected files

There's an example project that demonstrates it here.

share|improve this answer
add comment

Your Answer


