I'm having a little issue here in showing images.
So when I'm trying to load images from XAML, I can use a relative uri to the image source like this :
<Image Source="/Assets/image.jpg" />
But if I try to change the image source programatically from code behind, I always get an exception and I'm sure it's because of the false Uri. I tried something like this :
BitmapImage bitmapImage = new BitmapImage(new Uri("/Assets/image.jpg"));
Am I doing it wrong? Any help will be appreciated, thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…