public MainPage() { this.InitializeComponent(); Webview.UnsupportedUriSchemeIdentified += Webview_UnsupportedUriSchemeIdentified; Webview.Navigate(new Uri("http://localhost:3000")); }
private void OnRealized(object sender, EventArgs args) { Realized -= OnRealized; Browser = new Webview(Handle, true, true); string url = "https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy_(novel)"; Browser.Navigate(new UrlContent(url)); }
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { Webview.Visibility = Visibility.Collapsed; Webview.NavigateToString("Loading..."); if (!News.IsSelected) { BackButton.Visibility = Visibility.Collapsed; } if (tvflag) { MyFrame.Navigate(typeof(TsinghuaTV)); tvflag = false; } if (Courses.IsSelected) { Refresh.Visibility = Visibility.Collapsed; MyFrame.Visibility = Visibility.Visible; MyFrame.Navigate(typeof(Weblearn)); TitleTextBlock.Text = "网络学堂"; } else if (Login.IsSelected) { Refresh.Visibility = Visibility.Collapsed; MyFrame.Visibility = Visibility.Visible; MyFrame.Navigate(typeof(Loginindex)); TitleTextBlock.Text = "登录同步"; } else if (Mails.IsSelected) { Refresh.Visibility = Visibility.Collapsed; // Webview.Visibility = Visibility.Visible; // Webview.Navigate(new Uri("http://mails.tsinghua.edu.cn/coremail/xphone/index.jsp")); MyFrame.Navigate(typeof(Email)); //MyFrame.Navigate(typeof(WEBS)); TitleTextBlock.Text = "清华邮箱"; } else if (TV.IsSelected) { Refresh.Visibility = Visibility.Collapsed; MyFrame.Visibility = Visibility.Visible; MyFrame.Navigate(typeof(TsinghuaTV)); TitleTextBlock.Text = "高清电视"; tvflag = true; } else if (News.IsSelected) { Refresh.Visibility = Visibility.Collapsed; MyFrame.Visibility = Visibility.Collapsed; Webview.Navigate(new Uri("http://news.tsinghua.edu.cn/publish/thunews/index.html")); Webview.Visibility = Visibility.Visible; BackButton.Visibility = Visibility.Visible; TitleTextBlock.Text = "清华新闻"; } }
private void ComputeWebView(string url) { Uri feedUri = new Uri(url, UriKind.Absolute); Webview.Navigate(feedUri); }
private void Webview_NewWindowRequested(WebView sender, WebViewNewWindowRequestedEventArgs e) { Webview.Navigate(e.Uri); e.Handled = true; }