Skip to content

Platform Specifics

Axemasta edited this page Feb 1, 2022 · 3 revisions

There are platform specific configurations available to further customise the behaviour of the native control.

Android

Property Description Native Property
SetHardeningEnabled Determine whether the webview blocks file sharing Webview.Settings.AllowFileAccess, Webview.Settings.AllowFileAccessFromFileURLs, Webview.Settings.AllowContentAccess

iOS

Property Description Native Property
SetAllowsLinkPreview Determines whether site previews are allowed (when long touching links) WKWebView.AllowsLinkPreview

Usage

These platform configurations are referenced in the normal forms way:

superWebView.On<Xamarin.Forms.PlatformConfiguration.iOS>()
    .SetAllowsLinkPreview(false);

superWebView.On<Xamarin.Forms.PlatformConfiguration.Android>()
    .SetHardeningEnabled(true);
Clone this wiki locally