简体   繁体   中英

How to use web browser control in the browser?

I'm trying to load a HTML page via the web browser control in my Silverlight project, but it seems that the content of the control can only be viewed from out-of-browser mode.

Is there in way to use it in the browser?

Could you give more detail? if you are wanting to control and interact with the WebBrowser Control in the Internet Explorer window, then you can do this. The code will remain the same, except you will need to change your MSHTML DOM reference when declaring your (say) HTML Document, and it'll be declared as an InternetExplorer type (comes up in intellisense after the "As" part if you're using VB, same story with c#).

Once you reference this window, you can control it - everything is the same since IE uses the WB control as well, if you however want to use the WB control in your app, you should be able to, give us some more details, are you saying that the content or links are opening up in a new external IE window? If that is the case, these things are fixable :).

Also, if you're using WPF .NET I think there is a different, less cooler WB control for that than the traditional .NET WB control. Please elaborate on your question so I can help you further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM