Quantcast
Channel: Retrieve image at run-time
Viewing all articles
Browse latest Browse all 7

Retrieve image at run-time

$
0
0
Hi there,

there's two issues with your code:

  1. Your image's Build Action is not set to Resource . To change, select the file in the Solution Explorer, hit F4 and set the Build Action property accordingly.
  2. The URI in your code is wrong. You'll need to construct your URI in a way so that it knows that you're refering to the root of your solution. Just prefix your path with "/" (i.e. change your URI to "/Resources/Spike.jpg").

After that, it should work as desired.
Cheers,
Olaf

Viewing all articles
Browse latest Browse all 7

Trending Articles