Reputation:
I'm developing a metronome application, I made a bunch of images for it to display the rhythm number, but I don't know how tho load the images in the first place if I even need. I tried with this:
tactImgList[0] = new BitmapImage(new Uri("Assets/Images/1.png"));
And so on the rest, but I'm always getting a URI format exception.
What am I doing wrong? I tried to google my problem, but nothing.
Upvotes: 3
Views: 42
Reputation: 617
You should provide the full path to your file starting with "ms-appx:///".
tactImgList[0] = new BitmapImage(new Uri(@"ms-appx:///Assets/Images/1.png");
Upvotes: 1