-3

I'm building a webapp on Windows Phone 7 and when i'm trying to load a certain webpage on the WebBrowser controller, all i get is the page background color and nothing else. Other pages are lodaed just fine.

On the device IE Brwoser the page showen with no problems at all.

Here is my XAML code:

<phone:WebBrowser IsScriptEnabled="True"
                  HorizontalAlignment="Stretch"
                  Margin="0,10,0,0"
                  Name="webBrowser"
                  VerticalAlignment="Stretch"
                  Height="Auto"
                  Width="Auto"
                  VerticalContentAlignment="Stretch"
                  HorizontalContentAlignment="Stretch"
                  ScriptNotify="webBrowser_ScriptNotify"
                  LoadCompleted="webBrowser_LoadCompleted"/>

Thanks.

7
  • 2
    Well, obviously the problem is related to something completely different than your XAML. Nov 1, 2011 at 10:20
  • Is it that obviouse? i'm new to WP7 and C# generally. Do you have any idea what the problem may be?
    – Eitan
    Nov 1, 2011 at 11:34
  • Yes, something completely unrelated to all information you posted here. Nov 1, 2011 at 11:37
  • well i'm not doing any special initialization to the webBrowser in my code, and due to the fact that the page is loaded correctly on the Browser application and not loaded via the controller, Do you have any helpfull information/ideas ?
    – Eitan
    Nov 1, 2011 at 12:56
  • 2
    @Eitan, as a general problem solving approach, especially when learning more than one thing at a time, start with something simple that works, and then add to the solution until you are meeting your needs. For now, comment out this control and any C# code-behind that needs it. Add a simple WebBrowser with Source, Height, Width, and Name properties. Set the Source="bing.com". Get that working. Then replace the Source property with C# code to Navigate to that same URL. Get that working. Repeat this process. When you get stuck, rewrite your question using what you've learned. Nov 1, 2011 at 22:58

1 Answer 1

1

Thanks for your help guys.

I figured this out.

  • WebBrowser on Windows Phone 7.0 is supporting Internet Explorer 7 technologies.
  • WebBrowser on Windows Phone 7.1 (7.5) is supporting Internet Explorer 9 technologies.

My project was built for Windows Phone 7.0 and on the web page were use of some jQuery API that IE 7 is not supporting.

This is the reason why the the device browser load properly the page and the WebBrowser controller didn't.

As soon as I changed the project to build for 7.1 the problem solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.