binding image in windows phone 8
Can i bind image to xaml without needing to use image source (the
predominant method) which it is (In xaml page):
<Image Height="170" Width="220" Source="{Binding Source=Img}" ></Image>
because i have image converted from byte array and doesn't have any name
or source. like here:
Image Img = new Image();
Img=ByteArraytoBitmap(ob0[0].Img.ToArray());
public BitmapImage ByteArraytoBitmap(Byte[] byteArray)
{
MemoryStream stream = new MemoryStream(byteArray);
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(stream);
return bitmapImage;
}
No comments:
Post a Comment