locked
"You cannot call WebBrowser methods until it is in the visual tree" - error in windows phone 7 RRS feed

  • Question

  • I met a problem that I created a project as below in  windows phone OS 7 and in  windows phone OS 7.1, when run the project with OS 7,it produced a error:“InvalidOperationException was unhandled” notes:“You cannot call WebBrowser methods until it is in the visual tree” but run with OS 7.1 it didn't happen.

    I have found that in windows phone OS 7, if you create a webbrowser control with the code "new WebBrowser", you must add a loaded event handle method in your code which isn't needed in OS 7.1 .

    I’m so depressed that as a new learner, I don't know how to solve the problem that I need to create a WebBrowser control in a void method and call the WebBrowser's method navigate which produced a error as above.

    My code as below,I hope someone could help me. Thanks!

    • Moved by Jesse Jiang Monday, October 24, 2011 9:16 AM (From:Windows Mobile Development)
    Thursday, October 20, 2011 10:04 AM

Answers

  • You're in a wrong forum. Please use Windows Phone 7 forums instead: http://forums.create.msdn.com/forums/default.aspx?GroupID=19
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, October 20, 2011 4:05 PM

All replies

  • You're in a wrong forum. Please use Windows Phone 7 forums instead: http://forums.create.msdn.com/forums/default.aspx?GroupID=19
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, October 20, 2011 4:05 PM
  • Sorry, I have found that.
    Friday, October 21, 2011 1:57 AM