forum

Home / DeveloperSection / Forums / Bitmap images Binding

Bitmap images Binding

Anonymous User 2699 18-Dec-2013

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;
}

wpf wpf 
Updated on 18-Dec-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By