I've been pulling my hair out all day.
(我整天都在拔头发。)
I'm converting my WPF app to Xamarin.Forms (UWP, IOS and Android). (我正在将WPF应用程序转换为Xamarin.Forms(UWP,IOS和Android)。)
I'm currently focused on UWP and Android (don't have an apple devices yet) and I got a lot of the program running but I ran into a huge snag with reading files that are not in my sandbox directory. (我目前专注于UWP和Android(尚没有苹果设备),并且运行了很多程序,但是遇到了读取沙箱目录中未包含的文件的巨大麻烦。)
Currently, my app allows you to choose a folder with images and you can move through them. (目前,我的应用程序允许您选择一个包含图像的文件夹,并且可以在它们之间移动。)
To test out the reading functionality, I've placed the images into the "LocalState" directory and bingo, my code is working beautifully. (为了测试阅读功能,我将图像放入了“ LocalState”目录和宾果游戏中,我的代码运行得很漂亮。)
Now the program doesn't have a default folder and when I originally created it in WPF, the user would have a pop up and they would choose their own folder but I cannot for the life of me get a similar function for Xamarin. (现在该程序没有默认文件夹,当我最初在WPF中创建它时,用户将弹出一个窗口,他们将选择自己的文件夹,但是我终生无法获得Xamarin的类似功能。)
Every time I try something, I get an "access denied". (每次尝试尝试操作时,都会收到“访问被拒绝”的信息。)
I've seen Android apps allow you to pick a folder for emulators and I'm 100% sure that you can setup UWP to do permissions with StorageApplicationPermissions but I just cannot get this to work for Xamarin.Forms. (我已经看到Android应用允许您为仿真器选择一个文件夹,而且我100%确定可以设置UWP来使用StorageApplicationPermissions进行权限,但我只是无法使它适用于Xamarin.Forms。)
Please help me! (请帮我!)
ask by dbooher2011 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…