You cannot call WebBrowser methods until it is in the visual tree

Dec 1, 2010 at 2:15 PM

Hi,

When I user your control, sometimes, I had some issues, is there anyway to avoid it. It apparears when I navigate too fast between my pages.

The exception's stack :

You cannot call WebBrowser methods until it is in the visual tree.
à Microsoft.Phone.Controls.WebBrowserDisconnected.NavigateToString(String pszHtml)
à Microsoft.Phone.Controls.WebBrowser.NavigateToString(String html)
à adMob7.adMobRenderer.wcAdMob_UploadStringCompleted(Object sender, UploadStringCompletedEventArgs e)
à System.Net.WebClient.OnUploadStringCompleted(UploadStringCompletedEventArgs e)
à System.Net.WebClient.UploadStringOperationCompleted(Object arg)
à System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
à System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
à System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
à System.Delegate.DynamicInvokeOne(Object[] args)
Coordinator
Dec 1, 2010 at 4:16 PM

I'll have a look at it this weekend.

Regards

Dec 7, 2010 at 2:31 PM

Hi,

Did you have time to check this issue, do you plan to be able to fix it quickly ? It's just to know if  I put controls in my page for my first windows certification or if I'll put them in a next version of my app.

Thanks for your work.

BR.

Coordinator
Dec 7, 2010 at 2:42 PM

I've tried it but wasn't able to replicate it.  Can you send a small project replicating the issue to rgelb at yahoo.com?

Dec 19, 2010 at 2:50 AM

Perhaps you can take a look at this post regarding the WebControl visual tree issue.

http://blogs.msdn.com/b/dohollan/archive/2010/08/25/adventures-with-the-windows-phone-7-webbrowser-control.aspx

May 25, 2011 at 7:53 AM

the same problem here!