UWP GetParentAsync始终为null [英] UWP GetParentAsync always null

查看:116
本文介绍了UWP GetParentAsync始终为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,


我开发了一个在可移动设备上使用StorageFile和StorageFolder的UWP应用程序。


此应用程序正常运行PC,平板电脑和Windows Phone。


我正在VirtualBox上运行的Windows IoT上测试这个UWP:许多功能与其他设备的功能相同,但是当我在StorageFile上调用方法GetParentAsync()时和StorageFolder结果始终为null。


此函数在其他设备上运行正常,我只在Windows IoT上下文中出现此问题。



感谢您的支持


最好的问候



Alessio




解决方案

嗨Alessio,


快速搜索此论坛的"StorageFolder"会发现你多有用的帖子像这样的:

https://social.msdn.microsoft.com/Forums/en-US/5147e896-724d-4ee1- 8b85-21df5d433935 / access-data-from-usb-mass-storage-device-on-raspberry-pi2?forum = WindowsIoT


其他风味的Windows 10为您预先定义了很多东西,但为了保持IoT核心小,其中一些缺失,包括"文件选择器"和"文件选择器"。 。基础设施 这意味着您需要在
ne可访问之前添加文件类型的详细信息,因此为NULL响应。


此致


IoTGirl


Good morning,

I developed an UWP application that uses StorageFile and StorageFolder on Removable Devices.

This application works fine on PC , Tablet and Windows Phone.

I'm testing this UWP on Windows IoT running on VirtualBox: many features works same as the other devices but when i call method GetParentAsync() on StorageFile and StorageFolder the result is Always null.

This function works fine on other devices, i've this issue only in Windows IoT context.

Thanks for support

Best Regards

Alessio

解决方案

Hi Alessio,

A quick search of this forum for "StorageFolder" will find you multiple helpful postings like this one: https://social.msdn.microsoft.com/Forums/en-US/5147e896-724d-4ee1-8b85-21df5d433935/access-data-from-usb-mass-storage-device-on-raspberry-pi2?forum=WindowsIoT

The other flavors of Windows 10 have many things pre-defined for you but to keep IoT Core small, some of that is missing including the "File Picker" infrastructure.  This means that you need to add details of the file types before they will ne accessible, hence the NULL response.

Sincerely,

IoTGirl


这篇关于UWP GetParentAsync始终为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆