Show / Hide Table of Contents

Class BlazorWebView

An IBlazorWebView implementation for Android.

Inheritance
System.Object
BlazorWebView
Implements
IBlazorWebView
Namespace: BlazorWebView.Android
Assembly: BlazorWebView.Android.dll
Syntax
public class BlazorWebView : Fragment, IBlazorWebView

Constructors

| Improve this Doc View Source

BlazorWebView()

Initializes a new instance of the BlazorWebView class.

Declaration
public BlazorWebView()
| Improve this Doc View Source

BlazorWebView(IntPtr, JniHandleOwnership)

Initializes a new instance of the BlazorWebView class.

Declaration
public BlazorWebView(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
Type Name Description
System.IntPtr javaReference

A reference to a native java object.

Android.Runtime.JniHandleOwnership transfer

An enumeration indicating whether the ownership transfers.

Methods

| Improve this Doc View Source

Initialize(Action<WebViewOptions>)

Initialize the BlazorWebView.

Declaration
public void Initialize(Action<WebViewOptions> configure)
Parameters
Type Name Description
System.Action<WebViewOptions> configure

A delegate that is executed to configure the webview.

| Improve this Doc View Source

Invoke(Action)

Invoke a callback on the UI thread.

Declaration
public void Invoke(Action callback)
Parameters
Type Name Description
System.Action callback

The callback to execute.

| Improve this Doc View Source

NavigateToUrl(String)

Navigate to the specified URL.

Declaration
public void NavigateToUrl(string url)
Parameters
Type Name Description
System.String url

The URL to navigate to.

| Improve this Doc View Source

OnCreateView(LayoutInflater, ViewGroup, Bundle)

Called to have the fragment instantiate its user interface view. This is optional, and non-graphical fragments can return null (which is the default implementation).

Declaration
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Parameters
Type Name Description
Android.Views.LayoutInflater inflater

The LayoutInflater object that can be used to inflate any views in the fragment.

Android.Views.ViewGroup container

ViewGroup: If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view. This value may be null.

Android.OS.Bundle savedInstanceState

Bundle: If non-null, this fragment is being re-constructed from a previous saved state as given here.

Returns
Type Description
Android.Views.View

Return the View for the fragment's UI, or null.

| Improve this Doc View Source

SendMessage(String)

Send a message to javascript.

Declaration
public void SendMessage(string message)
Parameters
Type Name Description
System.String message

The message to send.

| Improve this Doc View Source

ShowMessage(String, String)

Show a native dialog for the platform with the specified message.

Declaration
public void ShowMessage(string title, string message)
Parameters
Type Name Description
System.String title

The title to show.

System.String message

The message to show.

Events

| Improve this Doc View Source

OnWebMessageReceived

Event that is fired when a web message is received from javascript.

Declaration
public event EventHandler<string> OnWebMessageReceived
Event Type
Type Description
System.EventHandler<System.String>

Implements

IBlazorWebView
  • Improve this Doc
  • View Source
Back to top Generated by DocFX