[UWP] FileOpenPicker在不调试时在WIn 10 Mobile中出现错误 [英] [UWP]FileOpenPicker Bugs in WIn 10 Mobile when not debugging
问题描述
我有一个非常奇怪的错误。我有一组代码行调用FileOpenPicker作为以下
I have a very weird bug. I have a set of lines of code that invoke a FileOpenPicker as the following
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)
{
}
else
{
MyImageFile = file;
var fs = await file.OpenAsync(FileAccessMode.Read);
BitmapImage bi = new BitmapImage();
bi.SetSource(fs);
MyImage = bi;
}
当我的应用程序在我的Windows 10 PC上运行时,一切正常,但是当我在我的win10手机上以发布模式部署我的应用程序时,一旦我选择了我想要的图像并验证,应用程序就会出错。当我调试时,应用程序在Win10移动设备上正常工作。
我真的不知道该怎么做。这是SDK上的一个错误,我应该忽略它,直到Win 10手机发布或我错过了什么。谢谢。
When my app is running on my Windows 10 PC everything is working fine, but when I deploy my app in release mode on my win10 mobile the app bugs as soon as i select the image that i want and validate. When I am debugging the app works fine on Win10 mobile. I really don't know what to do with this. Is it a bug on the SDK and I should ignore it until release of Win 10 mobile or did I miss something. Thanks.
Faical
Faical SAID Highwave Creations
Faical SAID Highwave Creations
推荐答案
嗨Faical,
Hi Faical,
< span style ="color:#0000ff">欢迎来到开发通用Windows应用程序
论坛!
请阅读粘贴帖子,尤其是
发布指南:主题行标记 和
Windows 10 SDK和工具的已知问题
Please read the sticky posts, especially the Guide to posting: subject line tags and Known Issues for Windows 10 SDK and Tools
在运行文件选择器(XAML)后,您是否已完成配置以继续运行Windows Phone应用程序手机?在Windows Phone移动应用中,我们需要调用此
PickSingleFileAndContinue 选择要打开的文件。当我们从Windows Phone Store应用程序调用文件选择器时,我们的应用程序将被停用,直到文件选择器返回用户所做的选择。但是,在低内存手机上,我们的应用可能会被终止。
由于这种可能性,我们必须在Windows Phone应用商店应用中调用不同的方法,而不是在我们通过Windows应用商店应用调用以在文件选择器操作后继续我们的应用时。
Have you done the configuration to continue your Windows Phone app after calling a file picker (XAML) when it runs on the Mobile? In Windows Phone mobile app we need to call this PickSingleFileAndContinue to Pick a file to open. When we call a file picker from a Windows Phone Store app, our app is deactivated until the file picker returns the selection made by the user. On low-memory phones, however, our app may be terminated. Because of this possibility, we have to call different methods in a Windows Phone Store app than when we call in a Windows Store app to continue our app after a file picker operation.
有关详细信息,请尝试参考以下文章:
#如何在调用文件选择器后继续使用Windows Phone应用程序( XAML):
https://msdn.microsoft.com/da-dk /library/dn614994.aspx 。
For more information, please try to refer to the following article:
#How to continue your Windows Phone app after calling a file picker (XAML):
https://msdn.microsoft.com/da-dk/library/dn614994.aspx .
这篇关于[UWP] FileOpenPicker在不调试时在WIn 10 Mobile中出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!