質問

I have this demo piece of code below:

<Image Name="imgCam" Width="400" Height="600" Visibility="Visible" Source="http://www.graffiti.org/prague/phoe_whs_2000.jpg" />

This shows in the designer, but when I run the emulator or try to view it on a phone it doesn't work? Is there something that I'm missing to get this image to display in the emulator and phone? The url will load the the image in a browser fine.

役に立ちましたか?

解決

This image also works in an Emulator for me, unless I remove the Networking permission from the App.

You should check that you have specified ID_CAP_NETWORKING in the Capabilities section of WMAppManifest.xml

<Capabilities>
 <Capability Name="ID_CAP_NETWORKING"/>
</Capabilities>

他のヒント

I have check with your URL in Emulator and its showing image in emulator. Check if your emulator has internet connection and is working properly.

Also you can try this. Uri uri = new Uri("Your URL", UriKind.RelativeOrAbsolute); Your_Image.Source = new BitmapImage(uri);

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top