为什么图像无法在基于HTML5的WP7应用程序中显示? [英] Why Images are not displaying in HTML5 based WP7 App?

查看:84
本文介绍了为什么图像无法在基于HTML5的WP7应用程序中显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过提供正确的图像源路径来显示解决方案中存在的图像,并将所有图像设置为"Content".
在模拟器和设备上运行Build时,我仍然看不到图像.
我该怎么办?
我做错了什么?
如何在我的应用程序中显示图像?
HTML中的文本可以完美显示,而图像则不能显示..
:(
:(
最近几天令人沮丧,无法解决此问题
帮帮我
!!
在Advance

I tried to display images present in my solution by providing correct image source path and set all Images to "Content" .
still i am not able to see images while running Build on Emulator as well as Device.
What should I do?
What am I doing wrong?
How I get Images Displayed in my App?
Text in HTML is perfectly displayed but not images..
:(
:(
Damn Frustrated from last few days to resolve this issue
Help me out
!!
Thanks in Advance

推荐答案

public partial class MainPage : PhoneApplicationPage
   {
          // Constructor
           public MainPage()
           {
                 InitializeComponent();

                 webBrowser1.Loaded += webBrowser1_Loaded;
           }

          void webBrowser1_Loaded(object sender, RoutedEventArgs e)
          {
               var html =
                  "<html><body>hi there" +
                  "<"img src ='HTMLBasedWP7App;components\DummyImage.jpg'"\"/>" +
                  "</body></html>";

                  webBrowser1.NavigateToString(html);
          }
   }


这是我使用的代码,DummyImage.jpg没有显示.
只有MainPage会显示此消息"hi there"和损坏的图像


This is the code i have used and DummyImage.jpg is not displaying.
only MainPage shows this message "hi there" and a broken image


这篇关于为什么图像无法在基于HTML5的WP7应用程序中显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆