【发布时间】:2018-02-19 18:33:45
【问题描述】:
我有一个 PCL 项目,最近将 Xamarin 表单更新到版本 2.3.4.270,但似乎在更新到此版本后,webview.navigated() 事件不会触发。
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;
【问题讨论】:
标签: xamarin xamarin.forms