fileopenpicker

“Invalid window handle” error when using FileOpenPicker from C# .net framwork 4.7.2 with Microsoft.Windows.SDK.Contracts without UWP

白昼怎懂夜的黑 提交于 2021-01-27 14:18:06
问题 I am trying to use Microsoft.Windows.SDK.Contracts to access the Windows10 API from .net framework WFP application. I want to use the FileOpenPicker() to select the image for OCR processing by Windows.Media.Ocr. But I met the 'Invalid window handle' error when using the picker I found a post which met the similar a link issue with C++/WinRT. One of the answer point out " The program will crash because the File­Open­Picker looks for a Core­Window on the current thread to serve as the owner of

C# UWP LiveSKD and OneDrive access using FileOpenPicker

☆樱花仙子☆ 提交于 2019-12-22 18:27:20
问题 I'm developing a Universal Windows Platform app that allows a user to open and edit files using the FileOpenPicker. The idea is that the user can choose any file on their computer, including files located in their OneDrive folders. On Windows 10 Desktop, this is working perfectly. However, on a Windows Phone 10 device, the result is very different. When a user chooses a file with the picker, the file is downloaded to a local storage folder, and the user is able to edit the file. But when the

C# UWP LiveSKD and OneDrive access using FileOpenPicker

微笑、不失礼 提交于 2019-12-06 09:34:06
I'm developing a Universal Windows Platform app that allows a user to open and edit files using the FileOpenPicker. The idea is that the user can choose any file on their computer, including files located in their OneDrive folders. On Windows 10 Desktop, this is working perfectly. However, on a Windows Phone 10 device, the result is very different. When a user chooses a file with the picker, the file is downloaded to a local storage folder, and the user is able to edit the file. But when the file is edited, it is not synced back to OneDrive. According to https://dev.onedrive.com/ Picker SDKs

OpenFilePicker not working on Windows Phone 8 (Specified method is not supported)

核能气质少年 提交于 2019-11-27 08:28:22
问题 I am trying to just pick a file using: private async void Button_Click_1(object sender, RoutedEventArgs e) { try { FileOpenPicker openPicker = new FileOpenPicker(); openPicker.ViewMode = PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; openPicker.FileTypeFilter.Add(".jpg"); openPicker.FileTypeFilter.Add(".jpeg"); openPicker.FileTypeFilter.Add(".png"); StorageFile file = await openPicker.PickSingleFileAsync(); if (file != null) { // Application