Hello,
Welcome to Microsoft Q&A!
The correct path is Project name + folder name + file name
.
For example
var image20 = new Xamarin.Forms.Image();
Assembly assembly = this.GetType().GetTypeInfo().Assembly;
byte[] imgByteArray = null;
using (var s = assembly.GetManifestResourceStream("FormsA.dog2.png"))
{
if (s != null)
{
var length = s.Length;
imgByteArray = new byte[length];
s.Read(imgByteArray, 0, (int)length);
MemoryStream newM = new MemoryStream(buffer);
image20.Source = ImageSource.FromStream(() => newM);
}
}
Best Regards,
Cole Xia
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.