【问题标题】:Load image from solution in WebView Xamarin Forms从 WebView Xamarin Forms 中的解决方案加载图像
【发布时间】:2016-02-07 12:25:27
【问题描述】:

我有内部 ScrollView 图像,我希望在某个新页面中打开选定的图像并进行捏合和缩放,我尝试使用 webview 控件,但我无法从我的解决方案路径加载图像。

void loadhtml()
   {
     var htmlSource = new HtmlWebViewSource {
     Html = "<!DOCTYPE html>\n<html>\n<body>\n<img src=\"myproject.Images.test.jpg\">\n</body>\n</html>"
    };
    MyWebView.Source = htmlSource;
   }

我可以从 WebView 中我的应用程序内部的路径加载图像吗?捏和缩放的另一种方法?

谢谢。

【问题讨论】:

    标签: webview xamarin xamarin.ios xamarin.android xamarin.forms


    【解决方案1】:

    实际上,您可以使用 Xamarin.Forms WebView 加载捆绑到您的应用程序中的内容。见此链接:https://developer.xamarin.com/guides/cross-platform/xamarin-forms/user-interface/webview/

    希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-03
      • 2018-05-13
      • 2021-09-29
      • 1970-01-01
      • 2021-02-24
      • 1970-01-01
      • 2018-09-17
      相关资源
      最近更新 更多