I am currently stuck on a piece of my project in Visual Studio 2017. The following code is meant to set the Source of an Image component on a .xaml page.
private void setImage()
{
var image = new Image();
var imageUrl = @"http://ddragon.leagueoflegends.com/cdn/5.2.1/img/" +
currentChamp.Image.Group + "/" + currentChamp.Image.Full;
Debug.Write(imageUrl);
BitmapImage bmi = new BitmapImage();
bmi.BeginInit();
bmi.UriSource = new Uri(imageUrl, UriKind.Absolute);
bmi.EndInit();
image.Source = bmi;
}
Here is the code to be referenced. ^^^
In all other questions I have found similar to what I am asking, this has unanimously been the correct/answered/approved way of doing what I am trying to do. However, I am receiving an error that no one else has received in any of the question
cannot implicitly convert system.windows.media.imaging.BitmapImage to Windows.UI.XAML.media.ImageSource
My imports, references, and types have all been checked and are correct. Am I missing a framework? Was there an update that may have caused this to no longer work?
I am using VS2017 working in Microsoft.NETCore.UniversalWindowsPlatform
Note that this is not a duplicate of this, as I am not referencing a resource folder and my path is Absolute.