WPF WebBrowser (.NET 3.5 SP1)


One of the new controls is the WebBrowser… aha!! not the Winforms control.. we now have it in WPF.


Functions supported by this control are:



  • NavigateToString

  • NavigateToStream

  • Navigate

  • GoBack

  • GoForward

 In xaml it would look like something like this:


<StackPanel Name=panel>


  <WebBrowser Height=500  >


  </WebBrowser>


</StackPanel>


 


 


 


I put together a simple sample which tries to use this functionality Looks like the above. Nothing fancy 🙂


Also since this is beta you might find a few rough edges (bugs) here and there.Please report them on the connect website or on the forums. 


Project Code: Attached


Share this post

 

WebBrowser.zip

Comments (15)

  1. Mark says:

    Ooh, nice. Yet another barrier to WPF adoption gone.

    Any rumours on whether this control will be in Silverlight 2.0?

  2. commenter says:

    That’s just cheating – you can’t rotate it!

  3. WPF Browser Control, Crossbow?

  4. Michael says:

    When loading your solution i get the following error message:

    Error 1 The tag ‘WebBrowser’ does not exist in XML namespace ‘http://schemas.microsoft.com/winfx/2006/xaml/presentation‘. Line 7 Position 6. D:WebBrowserWebBrowseradhocWindow1.xaml 7 6 adhoc

  5. llester says:

    you need to have.Net 3.5 SP1 to be installed on your machine

  6. ASP.NET Disabling a User Interface Element During a Partial Page Postback [Via: 4 Guys from Rolla ]…

  7. HolaMan says:

    it’s still handle-based window.

    not pure WPF visual control

  8. Graham says:

    Damn, that was what I feared. I guess whatever bits of IE they are running under the covers are hard to unshackle from this mode of operation. I would be great if this stuff could get rendered into a WPF visual off-screen, so that it would render properly. I’d imagine that would make all the input interaction hard to do though.

  9. Graham says:

    on that note, I wonder how difficult it would be to make a compliant html rendering engine using wpf. I wonder if anyone has started this project?

  10. Ed Blacker says:

    Can you set the http user-agent?

    Can you pass in an object for scripting so that javascript can call functions on it via windows.external?

  11. MSBuild MSBuild Reserved Properties [Via: Sayed Ibrahim Hashimi ] Sharepoint Adding Copy and Paste…

  12. Johannes says:

    Hallo

    That’s really cool but for us without SP1 we must still use the frame. Is it possible to load HTML into a document viewer or some other control that allow you to zoom the content?

  13. dinesh says:

    how can i set the title of the page i navigate to as my webbrowser header…i can get it by webBrowser.AxIWebBrowser2.LocationName…but AxiWebBrowser2 is not a public member hence not able to access it…any ideas??

  14. .NET 3.5 SP1 中新增了一个新的 WebBrowser 控件用于 WPF 应用中。以后在 WPF 程序中就不要用以前的 WinForm WebBrowser 了,直接在XAML中写&lt;WebBrowser&gt;标签即可。

  15. 【SharePoint】: SharePoint (MOSS) 2007 有了一个 SharePoint Online 服务了。这个是 Microsoft Online Services 的一部分,也是微软的&#8220;Everything