[Windows Phone] Web Browsing Control (WebBrowser)

This article demonstrates how to use the WebBrowser control in a Windows Phone application, and use the Navigate and WebBrowserTask methods to specify web pages and browse web pages.

Preface

This article demonstrates how to use the WebBrowser control in a Windows Phone application, and use the Navigate and WebBrowserTask methods to specify web pages and browse web pages.

Practice

step1 Create a project

Share a picture

step2 screen design

share picture

Button control: Name = btn1, Content = UU’s blog

Button control: Name = btn2, Cintent = Google

WebBrowser control: Name = wb

 












step3 btn1_Cli ck event:

private void btn1_Click(object sender, RoutedEventArgs e)

{

wb.Navigate (new Uri("http://www.dotblogs.com.tw/uvia820701/", UriKind.Absolute));
}

step4 btn2_Click event:

private void btn2_Click(object sender, RoutedEventArgs e)

{
WebBrowserTask wbTask = new WebBrowserTask();
wbTask.Uri = new Uri("https://www.google.com.tw/", UriKind.Absolute);
wbTask.Show();
}

Result

When you press the [UU’s blog] button, the WebBrowsew control will display the blog’s website, and when you press the [Google] button, it will jump out of Google’s Web page.

Share a picture??? ?Share a picture

Note

Since the network and WebBrower controls are used, Please refer to the figure below to enable the function.

share picture

Sample file

WebBrowser.rar

Related references and links

WebBrowser control for Windows Phone

Original text: Large column [Windows Phone] WebBrowser control (WebBrowser)

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5634 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.