JacobTheDev
JacobTheDev

Reputation: 18560

Embed Web Page in an App

I've created a simple Windows Phone app that launches the Google+ Mobile site. What I'd like to do, though, is a bit more complicated than that, and I have absolutely no idea how do to it.

Basically, I need help with this:

  1. Embed mobile Google+ in an app.
  2. If a user clicks on a link that's not on the same domain, open that link in IE
  3. Have an application bar with "back" and "home" buttons. Back could work with the built in back button if that'd be better.

If someone can point me in the right direction, that'd be great. If someone wants to help me with this project, that'd be even better.

Upvotes: 0

Views: 426

Answers (1)

johnhforrest
johnhforrest

Reputation: 991

  1. Using a WebBrowser control.
  2. You can create a handler for the Navigating event for the WebBrowser to check for the domain. Something like this:

<phone:WebBrowser Navigating="OnNavigating"/>

private void OnBrowserPostNavigating(object sender, NavigatingEventArgs e)
{
    //check for domain here, open IE accordingly
}
  1. You can latch onto the hardware back button and use that for your navigation similar to the way IE does on the phone. If you search SO there are plenty of questions regarding that. For the Home button, simply use the <phone:PhoneApplicationPage.ApplicationBar> xaml element and add a button with a handler to do the navigation for you.

Upvotes: 1

Related Questions