I've got a string of a location for an image, and I'm trying to create a XAML Image object, change the source to the string, and append it to a stackpanel.
Here's what I've tried so far:
System.Windows.Media.Imaging.BitmapImage tmp = new System.Windows.Media.Imaging.BitmapImage();
tmp.UriSource = new Uri("Assets/image.jpg", UriKind.RelativeOrAbsolute);
Image image = new Image();
image.Source = tmp;
The problem is that I can't seem to convert System.Windows.Media.Imaging.BitmapImage to Windows.UI.Xaml.Media.ImageSource.
I'm using that code pretty much directly off the Microsoft MSDN website, and I can't understand why it's not working. I've also tried creating an ImageSource object and I just can't seem to get anything to work. It's frustrating.