About how to use the WebBrowser control in your Windows Phone 7 application you can take a look at the related topics below.
Display Web Content from the Network
Here is a short copy form How to: Display Web Content from the Network Using the WebBrowser Control for Windows Phone
- From in side a .xaml file:
<phone:WebBrowser Source="http://www.bing.com" />
- From your .xaml.cs
webBrowser1.Source = new Uri("http://www.bing.com", UriKind.Absolute);webBrowser1.Navigate(new Uri("http://www.bing.com", UriKind.Absolute));
webBrowser1.Loaded += (object sender, RoutedEventArgs e) =>{
webBrowser1.Navigate(new Uri("http://www.bing.com", UriKind.Absolute));};
Display Static Web Content
Here is a short copy from How to: Display Static Web Content Using the WebBrowser Control for Windows Phone
public MainPage(){ InitializeComponent();
SupportedOrientations = SupportedPageOrientation.Portrait
| SupportedPageOrientation.Landscape;
webBrowser1.Loaded += WebBrowser_OnLoaded;
}
private void WebBrowser_OnLoaded(object sender, RoutedEventArgs e){
SaveFilesToIsoStore();
webBrowser1.Navigate(new Uri("readme.htm", UriKind.Relative));}
// the readme.htm here is your own static content
Display Dynamic Web Content
Here is a short copy from How to: Display Dynamically Generated Web Content Using the WebBrowser Control for Windows Phone
public MainPage(){
InitializeComponent();
SupportedOrientations = SupportedPageOrientation.Portrait
| SupportedPageOrientation.Landscape;
webBrowser1.Loaded += WebBrowser_OnLoaded;
}
private void WebBrowser_OnLoaded(object sender, RoutedEventArgs e){
webBrowser1.NavigateToString("<html><head><meta name='viewport' content='width=480, user-scalable=yes' /></head><body>HTML Text</body></html>");}
Related Topics:
- 31 Days of Windows Phone | Day #18: WebBrowser Control
- 45 Days of Windows Phone 7. Day # 24. WebBrowser. Part 2. Local content
- Navigating with the WebBrowser Control on WP7
- WebBrowser Class
- WebBrowser Control for Windows Phone
- WebBrowser Control Overview for Windows Phone
- WebBrowser Control Security Best Practices for Windows Phone
- Differences Between the Desktop and Device WebBrowser Controls for Windows Phone
- How to: Display Web Content from the Network Using the WebBrowser Control for Windows Phone
- How to: Display Static Web Content Using the WebBrowser Control for Windows Phone
- How to: Display Dynamically Generated Web Content Using the WebBrowser Control for Windows Phone
- WebBrowser Control Overview for Windows Phone
No comments:
Post a Comment