Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

BaseUrl for HtmlWebViewSource: how to use it?

$
0
0

I'm trying to set the BaseUrl of a HtmlWebViewSource for a WebView, so that local resources such as images can be shown when I want to load a web page from a "local" string containing the html.
I haven't been able to make it work (I tried only on iOS).

On a "regular" (i.e. not Xamarin Forms app) I've been able to make it work using this code:
webView.LoadHtmlString(template, new NSUrl(baseUrl, true));

In this code, I've used the overload of NSUrl that indicates that it is a directory. On Xamarin Forms I haven't found such function.
Is there a way to make it work?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>