Skip to main content

Microsoft Silverlight

Answered Question image resource loading problemRSS Feed

(0)

maephisto
maephisto

Member

Member

2 points

8 Posts

image resource loading problem

 I have an user control held in (app root)/controls/Devices/usercontrol.xaml in wich i need to load an image held in (app root)/resources/images/image.png , using an <image> element. What sould it be the source for the <image source="?"> ?

Thanks!

bharathkumars87
bharathk...

Member

Member

280 points

51 Posts

Re: image resource loading problem

 hai maephisto,

  Do like this sourse="../images/image.png"

bharath kumar.s
Please "Mark as Answer" if this post answered your question. :)

bykinag
bykinag

Member

Member

137 points

51 Posts

Answered Question

Re: image resource loading problem

Guaranteed way to get image

XAML CODE:
<Image Source="/YOUR_PROJECT_NAME;component/Images/Image.png"/>

bold required for writing

►(If this has answered your question, please click on "mark as answer" on this post. Thank you!)
NET / Silverlight Developer need work.

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24939 points

2,425 Posts

Microsoft
Answered Question

Re: image resource loading problem

Hi Maephisto,

That's based on source code structure. What's your app root?  Do you mean Silverlight application or Web application?  Generally, for the url path related issue, we can use a request detector, such as Fiddler, Web Development Helper, HttpWatch etc to get the request details.

 Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities