Bug 58105 - Embedded image in PCL not working
Summary: Embedded image in PCL not working
Alias: None
Product: Live Player
Classification: Xamarin
Component: Mobile App ()
Version: 1.0.253
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-07-12 12:05 UTC by Martin Jørgensen
Modified: 2017-08-31 17:00 UTC (History)
1 user (show)

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 58105 on Developer Community 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
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:

Description Martin Jørgensen 2017-07-12 12:05:13 UTC
Embedded image in PCL cannot be used accessed using:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"

    <Image Source="{local:ImageResource EmbeddedImage.image.png}" />



namespace EmbeddedImage
  public class ImageResourceExtension : IMarkupExtension
    public string Source { get; set; }

    public object ProvideValue(IServiceProvider serviceProvider)
      if (Source == null)
        return null;
      // Do your translation lookup here, using whatever method you require
      var imageSource = ImageSource.FromResource(Source);

      return imageSource;

On iOS and Android V1.0.439
"Visualization Error":
Object of type 'NInterpret.InterpretedObject' doesn't match target type 'Xamarin.Forms.Xaml.IMarkupExtension' (TargetException)

The same code works on a real Android device (I have not tested on a real iOS device)
Comment 1 James Montemagno [MSFT] 2017-08-31 17:00:52 UTC
This is referenced as a current limitation as: https://developer.xamarin.com/guides/cross-platform/live/limitations/