Bug 35758 - UWP preview cannot display image correctly
Summary: UWP preview cannot display image correctly
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 1.5.1
Hardware: PC Windows
: Normal enhancement
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-10 17:58 UTC by Jesse Jiang
Modified: 2017-06-22 02:21 UTC (History)
2 users (show)

Tags: uwp, ac
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 35758 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jesse Jiang 2015-11-10 17:58:43 UTC
I have Xamarin Forms page with image like <Image Source="test.png">.
And then I put this image into UWP project under Assets folder, like Assets/test.png

It cannot be display correctly.

I have check the Live Visual Tree, the image source property is "ms-appx:///test.png". 

It should be "ms-appx:///Assets/test.png"? It this a bug or how can I put images into UWP project?
Comment 1 E.Z. Hart [MSFT] 2015-11-11 17:16:04 UTC
Jesse,

Does the problem persist if you change

<Image Source="test.png">

to 

<Image Source="Assets/test.png" />

?
Comment 2 Jesse Jiang 2015-11-11 17:42:48 UTC
It cannot be. I need to share the PCL to Android and iOS.
Comment 3 E.Z. Hart [MSFT] 2015-11-11 17:47:32 UTC
Jesse,

If you put the image into the root folder of your UWP project (instead of the Assets folder) and use '<Image Source="test.png">', does the image display as expected?
Comment 4 Jesse Jiang 2015-11-11 18:03:33 UTC
Yes it works.

Maybe this isn't a bug of Xamarin.UWP. But I don't think put images under solution folder is a good struct of project. 
Can we set the image default folder as Assets in UWP, just like the Resources folder in iOS?
Comment 5 E.Z. Hart [MSFT] 2015-11-11 19:18:58 UTC
An alternate default folder isn't currently supported, so I'm marking this as an enhancement.
Comment 6 Jesse Jiang 2015-11-11 21:20:21 UTC
Sounds good
Comment 7 uwantfries 2017-05-25 16:04:19 UTC
Just saw this. Any update on a fix or sensible workaround?