private async void TopicWebViewOnNavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args) { TopicWebView.NavigationCompleted -= TopicWebViewOnNavigationCompleted; if (!string.IsNullOrEmpty(Loc.Topic.CurrentTopic.TopicReponseId)) { await TopicWebView.InvokeScriptAsync("scrollTo", new string[1] { Loc.Topic.CurrentTopic.TopicReponseId }); } }
private void CurrentTopic_TopicReadyToBeDisplayed(Topic topic) { if (topic != null) { TopicWebView.Navigate(Strings.TopicPageCacheUri); } else { TopicWebView.NavigateToString(""); } }
private void CurrentTopic_TopicReadyToBeDisplayed(Topic topic) { TopicWebView.NavigationCompleted += TopicWebViewOnNavigationCompleted; TopicWebView.Navigate(Strings.TopicPageCacheUri); }
async Task ScrollTo(string anchor) { await TopicWebView.InvokeScriptAsync("scrollTo", new string[1] { anchor }); }