Xamarin Formats: Using Embedded Resources in a PCL Project for an Image

I have 4 images in my Directory resource in my portable project and I would like to use them directly for ImageSource (because I need to link it).

ImageSource myImageSource = ImageSource.FromResource("resources.image.png");

I tried this, but it does not recognize the path. How can I use my images for ImageSource?

+4
source share
1 answer

Ok, I poorly forgot my project name in front of the resource directory

ImageSource myImageSource = ImageSource.FromResource("NameOfProject.Resources.image.png");
+3
source

All Articles