Windows phone 7 Webbrowser windows phone don';不显示图像

Windows phone 7 Webbrowser windows phone don';不显示图像,windows-phone-7,xaml,webbrowser-control,windows-phone-8,Windows Phone 7,Xaml,Webbrowser Control,Windows Phone 8,在我的windows phone应用程序中,我使用webbrowser来呈现如下HTML private void webBrowserHTML_Loaded(object sender, RoutedEventArgs e) { WebBrowser web = sender as WebBrowser; string description = web.DataContext.ToString(); web.NavigateToStri

在我的windows phone应用程序中,我使用webbrowser来呈现如下HTML

private void webBrowserHTML_Loaded(object sender, RoutedEventArgs e)
    {
        WebBrowser web = sender as WebBrowser;
        string description = web.DataContext.ToString();
        web.NavigateToString(description);
    }
我的问题是我的html代码在变量
description
中显示图像:

<a href=\"tel:3950\"><img width=\"220\" class=\"logo\" alt=\"3950\" src=\"bandeau3950.png\" /> </a>

我将该图像与代码放在同一文件夹中,但该图像未显示在应用程序中

有什么解决办法吗?

解决办法1

使用Base64图像uri格式,以便将图像定义为html的一部分。您可以使用在线转换工具,如

解决方案2

  • 将所有必需的映像复制到独立的存储文件夹。这可以在应用程序启动期间完成。
  • 收到html字符串后,将其保存到与index.html相同的独立存储器中

  • 导航(新Uri(“folder/index.html”,UriKind.Relative))

  • 在这种情况下,浏览器将能够显示图像,因为您的页面和图像位于同一个独立的存储文件夹中

    解决方案1

    使用Base64图像uri格式,以便将图像定义为html的一部分。您可以使用在线转换工具,如

    解决方案2

  • 将所有必需的映像复制到独立的存储文件夹。这可以在应用程序启动期间完成。
  • 收到html字符串后,将其保存到与index.html相同的独立存储器中

  • 导航(新Uri(“folder/index.html”,UriKind.Relative))


  • 在这种情况下,浏览器将能够显示图像,因为您的页面和图像位于同一个独立的存储文件夹中

    你是怎么解决的?我也面临同样的问题?你是如何解决的?我也面临同样的问题?