MidnightChe
Images doesn't show up in C# wpf
hello, so i've got an assignment due next week, i've got to create a wpf which, when it launches, shows several images of different countries and when i press start one of the countries has to be written at the bottom and with my mouse i have to go to the image of the country which corresponds and if i've chosen the right answer, the image has to become blurred. Almost everything works except my images, but I don't understand why. I've coded them well and I've done it in the same way as my teacher asked us to do, but still it doesn't work.
I coded them like this (because this is how our teacher gave us the example):
imgArgentina.Source = new BitmapImage(new Uri("img/argentina.png", UriKind.RelativeOrAbsolute));
imgFinland.Source = new BitmapImage(new Uri("img/finland.png", UriKind.RelativeOrAbsolute));
imgJapan.Source = new BitmapImage(new Uri("img/japan.png", UriKind.RelativeOrAbsolute));
imgMarokko.Source = new BitmapImage(new Uri("img/marokko.png", UriKind.RelativeOrAbsolute));
imgNieuwzeeland.Source = new BitmapImage(new Uri("img/nieuwzeeland.png", UriKind.RelativeOrAbsolute));
8 replies
Learning C#
Hello, I'm a first-year IT student (in Belgium) and I'm struggling with C# (visual studio). I'm looking for good videos, online courses, etc ... to better learn to code with C# and understand "how C# works" If you have advice or videos that can help me, it would be really nice! Thanks in advance.
9 replies