Sootah
Sootah

Reputation: 1811

Silverlight - Image Not Loading from URI at Runtime?

I've added an image element to my Silverlight app, and while the image pulls right up when in design mode, it doesn't load at all when running the app.

Code is:

<Image Height="95" 
       HorizontalAlignment="Left" 
       Margin="12,541,0,0" 
       Name="imgBannerAd" 
       Stretch="Fill" 
       VerticalAlignment="Top" 
       Width="828" 
       Source="http://myurl.com/images/theimage.png" 
       />

What's the deal? I'd tried running the file via the local hard drive and localhost, neither has any effect.

Upvotes: 0

Views: 897

Answers (2)

Samuel Jack
Samuel Jack

Reputation: 33270

This occurs when you test your file using the Visual Studio generated test html file, loaded directly from disk.

If you create an Asp.Net application to host your Silverlight XAP, the problem should go away.

Upvotes: 0

slugster
slugster

Reputation: 49974

I would check that

Upvotes: 1

Related Questions