<Image.../> fails [SOLVED]

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
hamej
Posts: 37
Joined: Thu Oct 01, 2015 8:41 am

<Image.../> fails [SOLVED]

Postby hamej » Fri Oct 02, 2015 2:02 am

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?

CyborgDE
Posts: 75
Joined: Wed Aug 12, 2015 9:21 pm

Re: <Image.../> fails

Postby CyborgDE » Fri Oct 02, 2015 11:10 pm

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

hamej
Posts: 37
Joined: Thu Oct 01, 2015 8:41 am

Re: <Image.../> fails

Postby hamej » Sat Oct 03, 2015 4:28 am

Works! Thank you for quick answer.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 2 guests

 

 

cron