private void PickAndLaunchFileButton_Click(object sender, RoutedEventArgs e)
        {
            // First, get a file via the picker.
            var openPicker = new Windows.Storage.Pickers.FileOpenPicker();

            openPicker.FileTypeFilter.Add("*");
            openPicker.PickSingleFileAndContinue();
        }
Exemplo n.º 2
0
        private void AddAttachButton_Click(object sender, RoutedEventArgs e)
        {
            Windows.Storage.Pickers.FileOpenPicker openPicker = new Windows.Storage.Pickers.FileOpenPicker();
            openPicker.SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.PicturesLibrary;
            openPicker.ViewMode = Windows.Storage.Pickers.PickerViewMode.Thumbnail;

            // Filter to include a sample subset of file types.
            openPicker.FileTypeFilter.Clear();
            openPicker.FileTypeFilter.Add(".bmp");
            openPicker.FileTypeFilter.Add(".png");
            openPicker.FileTypeFilter.Add(".jpeg");
            openPicker.FileTypeFilter.Add(".jpg");

            // Open the file picker.
            openPicker.PickSingleFileAndContinue();
        }
 private void PickAndLaunchFileButton_Click(object sender, RoutedEventArgs e)
 {
     // First, get a file via the picker.
     var openPicker = new Windows.Storage.Pickers.FileOpenPicker();
     openPicker.FileTypeFilter.Add("*");
     openPicker.PickSingleFileAndContinue();
 }