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

Dec 1, 2010 at 3:15 PM


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)
Dec 1, 2010 at 5:16 PM

I'll have a look at it this weekend.


Dec 7, 2010 at 3:31 PM


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.


Dec 7, 2010 at 3: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

Dec 19, 2010 at 3:50 AM

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

May 25, 2011 at 8:53 AM

the same problem here!