Skip to content
Axemasta edited this page Jun 22, 2021 · 2 revisions

NuGet SuperWebViewNuGetShield

This package is available on NuGet.org

Install

Install this package in your Xamarin.Forms projects (shared, ios, android).

Note

The Android implementation references Mono.Android.Export.dll. You shouldn't need to reference this dll but it could affect behaviour when linking has been applied so it is something to be aware of. If you experience any unexplained crashes when using the javascript functionality, this would be a good place to start.

Reference

Reference the control in Xaml or codebehind:

Xaml:

<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:super="clr-namespace:Axemasta.SuperWebView;assembly=Axemasta.SuperWebView"
    x:Class="Acme.MyApp.MyPage">
    <ContentPage.Content>
        <super:SuperWebView x:Name="superWebView" Source="https://www.github.com"/>
    </ContentPage.Content>
</ContentPage>

Code Behind:

public class MyPage : ContentPage
{
    SuperWebView _superWebView;

    public MyPage()
    {
        _superWebView = new SuperWebView();

        Content = _superWebView;

        var githubSource = new SuperUrlWebViewSource()
        {
            Url = "https://www.github.com"
        };

        _superWebView.Source = githubSource;
    }
}

Once you have set the Source property, the website will begin to load.

For more usage examples see the samples project.

Clone this wiki locally