本文介绍了ImageSource.FromFile 在 Xamarin UWP 中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用
MyImage.Source = ImageSource.FromFile("test.PNG");
有关更多信息,请参阅工作带图片.
I am using the ImageSource.FromFile to set the image source but the image not loaded in Xamarin uwp. Please refer to my code.
newImage.Source = ImageSource.FromFile("C:/Users/Username/Desktop/Image1.png");
Thanks,Santhiya A
解决方案
The problem is you could not pass file path to FromFile
method. And the available parameter is the name of a file where in the uwp client project root path.
MyImage.Source = ImageSource.FromFile("test.PNG");
For more please refer working with image.
这篇关于ImageSource.FromFile 在 Xamarin UWP 中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!