Lester's WPF\SL Blog

Simple, Easy & Beautiful

WPF WebBrowser (.NET 3.5 SP1)

WPF WebBrowser (.NET 3.5 SP1)

Rate This
  • Comments 15

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

 

Attachment: WebBrowser.zip
  • Ooh, nice. Yet another barrier to WPF adoption gone.

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

  • That's just cheating - you can't rotate it!

  • WPF Browser Control, Crossbow?

  • 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:\WebBrowser\WebBrowser\adhoc\Window1.xaml 7 6 adhoc

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

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

  • it's still handle-based window.

    not pure WPF visual control

  • 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.

  • 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?

  • 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?

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

  • 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?

  • 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??

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

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

Page 1 of 1 (15 items)