private async void Page_SizeChanged(object sender, SizeChangedEventArgs e) { try { WEBpost.Height = Convert.ToInt32(await WEBpost.InvokeScriptAsync("eval", new[] { "document.documentElement.scrollHeight.toString();" })); } catch { } }
private async void WEBpost_NavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args) { try { WEBpost.Height = Convert.ToInt32(await WEBpost.InvokeScriptAsync("eval", new[] { "document.documentElement.scrollHeight.toString();" })); } catch (Exception e) { return; } }
private void HYPERmore_Click(object sender, RoutedEventArgs e) { if (!_originMode) { _originMode = true; WEBpost.NavigateToString(_originHtml); HYPERmore.Content = "less"; } else { _originMode = false; WEBpost.NavigateToString(html); HYPERmore.Content = "more"; } }
private async void WEBpreprocess() { try { PRGRS.ProgressStart(); HYPERsource.NavigateUri = new Uri("https://stackoverflow.com/questions/" + info.ID); Parameters result = await WebConnection.ConnctWithGet("https://stackoverflow.com/questions/" + info.ID); if (!result.name.Equals("200")) { return; } html = HandleHTML(result.value); WEBpost.NavigateToString(html); PRGRS.ProgressEnd(); } catch { return; } finally { } }