Convert your image in to byte array
private byte[] GetImageAsByteArray(string imageName)
{
var streamResourceInfo =
Application.GetResourceStream(new Uri("YourProjectNameSpace;component/ImageFolderName/"+imageName)",
UriKind.Relative));
byte[] image = {};
if (streamResourceInfo != null)
{
var length = streamResourceInfo.Stream.Length;
image = new byte[length];
streamResourceInfo.Stream.Read(image, 0, (int)length);
}
return image;
}
Sample Usage
var yourViewModel = new ViewModel();
yourViewModel.Image=GetImageAsByteArray("jemi.jpg");
Bind the property to the image control
<Image Source=”{Binding Image}”></Image>