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

Similar Method For WebViewClient in Xamarin forms

$
0
0

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


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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