Urls used to navigate to different pages must always start with a “/” (forward slash). This is because “NavigationService.Navigate” only allows relative Urls.
Urls used as the source for Image controls can contain a beginning slash, but can also omit them and it will still work.
So both of the following are valid ways to reference images in your WP app. (as long as you have set the build action on the image to Content and the build action to Copy Always/If Newer).
Image Name="image1" Source="Assets/image.jpg"
Image Name="image1" Source="/Assets/image.jpg"
Tips:
Silverlight for Windows Phone 7 only supports Png and Jpeg. Gif is not supported.
No comments:
Post a Comment