private async void FileListView_OnDrop(object sender, DragEventArgs e) { if (e.DataView.Contains(StandardDataFormats.StorageItems)) { var storageItems = await e.DataView.GetStorageItemsAsync(); LocalFileCollection.AddRange(storageItems.Select(x => (StorageFile)x).ToList()); } }
private async void OnBrowseFilesButtonClicked(object sender, RoutedEventArgs e) { string[] inputFormExtensions = FormRecognizerExplorer.ImageExtensions.Concat(FormRecognizerExplorer.PdfExtensions).ToArray(); IReadOnlyList <StorageFile> selectedFiles = await Util.PickMultipleFilesAsync(inputFormExtensions); if (selectedFiles != null && selectedFiles.Any()) { LocalFileCollection.AddRange(selectedFiles); } }