What is the problem in this code ? Why the firstimage did not show on XAML page when I am binding the source of image in XAML to firstimage here in the code? The class contains the code is not a partial class.
if (ImagesAsSource[realty.ObjectId].Count == 0)
//private static Uri _baseUri = new Uri("ms-appx:///");
{
Uri img = new Uri(_baseUri, "Assets/back.jpg");
BitmapImage result = new BitmapImage();
result.UriSource = img;
// firstimage is type of ImageSoure
firstimage =result;
}
//I tried this:
//private static Uri _baseUri = new Uri("ms-appx:///");
{
Uri img = new Uri(_baseUri, "Assets/back.jpg");
BitmapImage result = new BitmapImage(img );
// firstimage is type of ImageSoure
firstimage =result;
}
Anonymous User
18-Dec-2013You should try something like this:
In fact I don't know constructor for your BitmapImage, so may be you should convert byte[] into Stream