Drahcir
Drahcir

Reputation: 12621

Silverlight : Implementing Images

I just created a puppet in Microsoft Blend consisting of imageboxes that are displaying a dummy image(Which is a white box). In blend it shows the images but in visual studio (and when running the application) the images aren't showing.

This is a snippet of the code I am using

<Image Source="/Images/BodyParts/dummy.jpg" Height="10" Width="20" Stretch="Fill" OpacityMask="{x:Null}" x:Name="backFoot" Canvas.Left="41.71" Canvas.Top="147.668" />

alt text http://img26.imageshack.us/img26/1401/blendvscomparewo7.jpg

Please note that the circles you are seeing in both versions are different controls not images.

Upvotes: 1

Views: 164

Answers (1)

G. Ghez
G. Ghez

Reputation: 3593

Be sure your picture "dummy.jpg" appears in the solution explorer within the correct folder

example:

Solution Explorer http://img403.imageshack.us/img403/4976/solutiontm2.jpg

And if you right click -> properties on the image, you should see the "Properties" window.

Then set the "Build Action" to "Content" as shown below:

Properties http://img338.imageshack.us/img338/9166/propertiesfl9.jpg

Upvotes: 2

Related Questions