Page 1 of 1

<Image.../> fails [SOLVED]

Posted: Fri Oct 02, 2015 2:02 am
by hamej
I make this very simple XAML:
<Grid>
<Image Stretch="UniformToFill" Source="Data/Icons/Background.png"/>
</Grid>

It gives this error, when trying to run:

An exception of type 'System.Exception' occurred in CSharpXamlForHtml5.dll but was not handled in user code

Additional information: Current version only supports URIs that start with ms-appx:/ or http:/ or https:/

Shouldn't this work?

Re: <Image.../> fails

Posted: Fri Oct 02, 2015 11:10 pm
by CyborgDE
Hello,

you must use as source either "ms-appx:/" or "http:/".

Try :

Code: Select all

<Image Stretch="UniformToFill" Source="ms-appx:/Data/Icons/Background.png"/>

an set the image properties to build:content and "not copy to output" ...

Regards,
CyborgDE

Re: <Image.../> fails

Posted: Sat Oct 03, 2015 4:28 am
by hamej
Works! Thank you for quick answer.