public Task LaunchFileSelectionServiceAsync() { FolderPicker savePicker = new FolderPicker(); savePicker.FileTypeFilter.Add("*"); savePicker.CommitButtonText = "Save All"; Task task = null; #if WINDOWS_PHONE_APP this.completionSource = new TaskCompletionSource<int>(); savePicker.PickFolderAndContinue(); task = this.completionSource.Task; #endif #if WINDOWS_APP task = savePicker.PickSingleFolderAsync().AsTask().ContinueWith( fileTask => { this.storageFolder = fileTask.Result; }); #endif return task; }
private void PickFolderButton_Click(object sender, RoutedEventArgs e) { // Clear previous returned folder name, if it exists, between iterations of this scenario OutputTextBlock.Text = ""; FolderPicker folderPicker = new FolderPicker(); folderPicker.SuggestedStartLocation = PickerLocationId.Desktop; folderPicker.FileTypeFilter.Add(".docx"); folderPicker.FileTypeFilter.Add(".xlsx"); folderPicker.FileTypeFilter.Add(".pptx"); folderPicker.PickFolderAndContinue(); }
public async void BeginTest() { if (staCode == null) { var staFile = enumerateFiles(Package.Current.InstalledLocation).First(x => x.DisplayName == "sta"); staCode = new StreamReader((await staFile.OpenReadAsync()).AsStream(0)).ReadToEnd(); } (Application.Current as App).Activation += activation; FolderPicker picker = new FolderPicker(); picker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; picker.FileTypeFilter.Add(".js"); picker.PickFolderAndContinue(); }
private async void OpenFolderClick(object sender, RoutedEventArgs e) { var picker = new FolderPicker() { ViewMode = PickerViewMode.Thumbnail, SuggestedStartLocation = PickerLocationId.DocumentsLibrary, FileTypeFilter = { "*" }, }; #if WINDOWS_APP var folder = await picker.PickSingleFolderAsync(); DisplayFolderInfo(folder); #elif WINDOWS_PHONE_APP picker.PickFolderAndContinue(); #endif }
private void ExecuteScanLocalLibraryPickFolder(object parameter) { FolderPicker openPicker = new FolderPicker(); NavigationManager.Current.ContinuationInfo = new CustomFolderSyncContinuationInfo(); openPicker.PickFolderAndContinue(); }
private void OnLocateWPSystem(object pSender, RoutedEventArgs pE) { var pick = new FolderPicker(); pick.SettingsIdentifier = "wpsystem"; pick.FileTypeFilter.Add("*"); pick.PickFolderAndContinue(); }
private void StartOpenPhotoFolder() { var picker = new FolderPicker(); picker.FileTypeFilter.Add(".jpg"); picker.FileTypeFilter.Add(".jpeg"); picker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; picker.ViewMode = PickerViewMode.Thumbnail; picker.ContinuationData["Operation"] = "OpenPhotoFolder"; picker.PickFolderAndContinue(); App.ContinuationEventArgsChanged += App_ContinuationEventArgsChanged; }
private void SaveImageAs_Clicked(object sender, RoutedEventArgs e) { FolderPicker folderPicker = new FolderPicker(); folderPicker.SuggestedStartLocation = PickerLocationId.Downloads; folderPicker.PickFolderAndContinue(); }