public interface IBaseUrl { string Get(); }
public partial class PayMePage :ContentPage
{
public PayMePage()
{
InitializeComponent();
var browser = new WebView();
var htmlSource = new HtmlWebViewSource();
htmlSource.Html = @"<html>
<body>
<h1>Xamarin.Forms</h1>
<p>The CSS and image are loaded from local files!</p>
<img src='XamarinLogo.png'/>
<p><a href=""Paymepage.html"">next page</a></p>
</body>
</html>";
htmlSource.BaseUrl = DependencyService.Get<IBaseUrl>().Get();
browser.Source = htmlSource;
Content = browser;
}
}
I like to implement this code through WebViewClient