ImageSource.FromFile not working in Xamarin UWP?

Viewed 614

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

1 Answers

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.

enter image description here

MyImage.Source = ImageSource.FromFile("test.PNG");

For more please refer working with image.

Related