Xamarin.Forms WebView and Shell Tabs

DonMesserli 1 Reputation point
2020-12-08T20:18:57.373+00:00

I am using WebViews in Shell Tabs. Sometimes, I set the Source for the webview if it's the current tab. Other times, I set some properties in the webview, do the Shell navigation, and set the Source in the page's OnAppearing.

A lot of the time, the WebView's content isn't update despite the fact that Navigating and Navigated are called with the proper Url. I even verified with Charles Proxy that the web page was returned from the server.

When it doesn't work, when I then change to yet another tab, the proper web page from the previous tab is shown briefly and then the wrong page is displayed.

I've also noted that Navigating is called twice (and Navigated is called once) when it works. They are each called once when it doesn't work.

First of all, is the a way to get the WebView to redraw?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,272 questions
{count} votes