Ich habe ein PCL-Projekt und vor kurzem die Xamarin-Formulare auf Version 2.3.4.270 aktualisiert, aber es scheint, dass nach dem Update auf diese Version das Ereignis webview.navigated()
nicht ausgelöst wird.Xamarin Formulare Webview Navigated Event
var browser = new BaseUrlWebView();
var htmlSource = new HtmlWebViewSource();
htmlSource.Html = @"<html>
<head>
<link rel=""stylesheet"" href=""default.css"">
</head>
<body>
<h1>Xamarin.Forms</h1>
<p>The CSS and image are loaded from local files!</p>
<img src='XamarinLogo.png'/>
<p><a href=""local.html"">next page</a></p>
</body>
</html>";
htmlSource.BaseUrl = DependencyService.Get<IBaseUrl>().Get();
browser.Navigated += (sender, e) => {
this.DisplayAlert("Navigated", "Navigated the page", "Cancel");
};
browser.Source = htmlSource;
Content = browser;