views:

2415

answers:

3

WPF WebBrowser control looks great but knowledge accumlated over time about WinForms WebBrowser is substantial and it's hard to ignore work like csExWB. It would be nice to know what functional shortcomings or advantages exists in .NET 3.5's WPF WebBrowser control over WinForms WebBrowser control. In particular, is it possible to build csExWB-like functionality on top of WPF WebBrowser?

+1  A: 

I must admit I don't know the differences, but if you hit problems you could perhaps use WindowsFormsHost to host the winform version in WPF, like so? Ultimately, both is a wrapper around shdocvw, so principles like "pure WPF" don't really apply.

Marc Gravell
+1  A: 

From one full day of frustration with wpf's component, here's what I discovered. Apparently, winforms webbrowser exposes much more methods and properties. For instance, there's no IsWebBrowserContextMenuEnabled, ActiveXInstance, etc. in wpf webbrowser.

Also, the document property of each contains different types of objects. Winform contains a document of type System.Windows.Forms.HtmlDocument with a few interesting methods and properties like PointToClient and GetElementFromPoint. Wpf webbrowser document is an Object type document that can be cast to mshtml.HtmlDocument, which only provides the same methods and properties available from a standard html + javascript document. Not very exciting. I don't know if it can be cast to something else (useful that is) since there's no real documentation about it.

The only disadvantage I could notice about winforms webbrowser is that the buttons and scrollbars inside the component don't have the same appearance as the wpf native controls.

facildelembrar
A: 

Wpf is advance technology than winforms.by using wpf we can build rich internet application.

bhhhjhb