xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.87k forks source link

The control is not loading while using Webview2 in the HybridWebview custom renderer on the Xamarin.Forms.UWP platform. #15786

Open Gayathri-github7 opened 1 year ago

Gayathri-github7 commented 1 year ago

Title: The control is not loading while using Webview2 in the HybridWebview custom renderer on the Xamarin.Forms.UWP platform. Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/HybridWebview21359003660

We suspect that the source property is not set properly. Please find the code snippet for it below.

private const string LocalScheme = "ms-appx-web:///Content//"; public void LoadUrl(string url) { var uri = new Uri(url, UriKind.RelativeOrAbsolute); if (!uri.IsAbsoluteUri) uri = new Uri(LocalScheme + url, UriKind.RelativeOrAbsolute);

Control.Source = uri;

}

Note: The control rendered properly if we use WebView instead of WebView2.

Gayathri-github7 commented 1 year ago

Any update on this?

Gayathri-github7 commented 1 year ago

Any update on this?

Gayathri-github7 commented 1 year ago

Any update on this?