Click here to Skip to main content
15,900,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, This is a nubie question, I have a silverlight 5 (VB) application that runs fine and displays all 3 png images when I run it from my PC. When the app is put onto the web it doesn't show the png Images. The build I have selected for the png files is Resource? I checked the XAP.zip to see if the png files are there and they are.
I've done a bit of research and found that I may need some coding to enable me to get these up and running on the web unfortunately everything I've looked at is in C. I have found these two pieces of code :
XML
myIamge.Source = new BitmapImage(new Uri("../Image/computer.JPG", UriKind.Relative));

<Image x:Name="myIamge" Source="../computer.JPG"></Image>

Are these two pieces of code what I need?
Do I need them both together?
Does anyone know the conversion Of the first piece of code from c to vb


Is there anyone out there that can tell me how to do this in silverlight VB

Kind regards

Will.
Posted
Updated 8-Mar-13 8:25am
v2

1 solution

 
Share this answer
 
Comments
willrob68 8-Mar-13 16:36pm    
Hi Jason, thanks for getting back to me. I'm sure that the answer is there but I'll be honest with you C is like looking at clingon to me. Is that answer at the address you gave me the only piece of code I need from there to convert into vb?
Thanks
Will.
JasonMacD 8-Mar-13 16:57pm    
Use one or the other. Which ever you prefer.
willrob68 9-Mar-13 2:45am    
Do I need to do anything with the XAML? At present the png imajes are in a folder of there own in the same location as the MainPage.XMAL. The png files at present are loaded into the application via the standard silverlight controls and the XMAL code for the path to the png files was automatically generated. Do I need to do anything to this? Or do I just leave as is and use the code in your recommended answer.
Thanks
Will.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900