WPF browser control

201 views
Skip to first unread message

Sacha Barber

unread,
Nov 8, 2009, 8:18:35 AM11/8/09
to wpf-di...@googlegroups.com
I got an email from someone who wants to add mult touch to one of my old articles where I was showing YouTube videos in a BrowserControl.

Turns out there is a Nice Chrome browser which Chris Cavanagh has wrapped to make it more WPF like.

The Chromium browser is the open-source base layer of the Google
Chrome browser. Chris Cavanagh has built a wrapper for WPF
(http://chriscavanagh.wordpress.com/2009/08/25/a-real-wpf-webbrowser/)
based on another wrapper called Awesomium
(http://princeofcode.com/awesomium.php#download). With that, you can
have a full web browser (non-ActiveX) in WPF, enabling layout, 3D,
etc.

Nice, quite useful I imagine.

--
Sacha Barber
sacha....@gmail.com

Michael Sync

unread,
Nov 8, 2009, 9:54:55 AM11/8/09
to wpf-di...@googlegroups.com
Hi Sacha,
 
I downloaded the code and tried to recompile it but there was some errors with that control at that time. As this is just a wrapper, I didn't see this control solve the prolem that WPF web browser can't solve. I checked this control only in limited time so I might be wrong. It would be great if someone can come up with the comparison between these two controls. We all know that WPF (.NET 3.5 sp1) control has a few problems with scrollviewer or z-index or etc.
 
I heard that Awesomium is no longer open source or something. Initially, they release the code in code.google.
 
Regards,
Michael Sync

--
Don't go the way life takes you.
Take life the way you go

http://michaelsync.net

Sacha Barber

unread,
Nov 8, 2009, 10:32:45 AM11/8/09
to wpf-di...@googlegroups.com
Micheal,

You can not use the .NET 3.5 SP1 web browser on any tranform or on a 3d mesh as its a HWnd based control. This one is not, check it out on his blog, you will see what I mean.

Its Soooo different from the .NET 3.5 SP1 web browser
--
Sacha Barber
sacha....@gmail.com

Daniel Vaughan

unread,
Nov 8, 2009, 12:27:07 PM11/8/09
to WPF Disciples
Yes, there were some other posts about the browser. Looks interesting.
Would be nice to have a 'real' browser. http://tinyurl.com/yljpsvn
> sacha.bar...@gmail.com

Jeremiah Morrill

unread,
Nov 8, 2009, 3:53:54 PM11/8/09
to wpf-di...@googlegroups.com
I poke around the source-code when, Laurent posted about it.

He did a pretty good job, though it won't compile the debug version as the debug lib was 50 megs.

He uses a WriteableBitmap, which is pretty slow, but what is interesting is the Awesomium reports back dirty regions, so they fit nicely together.   For funsies, I did a conversion to use the InteropBitmap and did get a bit of a perf boost.  Maybe .NET 4.0 will be better w/ WB now that it actually honors dirty rects, instead of pretending to.

I hope someday the native WPF browser control will support this...anything that is based off the HwndSource class should get the boot! :) 

Sacha Barber

unread,
Nov 9, 2009, 3:41:18 AM11/9/09
to wpf-di...@googlegroups.com
Jer
 
Let us know if you ever do a better version, I could use one soon.

--
Sacha Barber
sacha....@gmail.com

Michael Sync

unread,
Nov 9, 2009, 3:46:42 AM11/9/09
to wpf-di...@googlegroups.com
Thanks, Sacha. maybe, I will need to re-check it again. I didn't use 3d or etc with browser but I wanna check whether this browser control is okay with scroll viewer and positing ..  Thanks, man. :)

Jeremiah Morrill

unread,
Nov 9, 2009, 4:04:49 AM11/9/09
to wpf-di...@googlegroups.com
Homeboy did a pretty good job as is, though I did not really put it through it's paces.  I think this control could be a lifesaver for UIs like Surface where there is no definitive "top" or "bottom" of the screen.  Though I wonder if it transforms the inputs when it's rotated...

I'd like to make one supporting IE, but I have not been able to find any good low level hooks for rendering to an intermediate.  I would like to investigate if the IE activex supports IOleInPlaceSiteWindowless. If it does, consider it done ;)

-Jer

Sacha Barber

unread,
Nov 9, 2009, 5:27:06 AM11/9/09
to wpf-di...@googlegroups.com
Cololio, I wish I knew what the hell you were talking about Jer I really do, this Win32 low level jargon goes way over my head, I wanted to commit to learning it, but there is so much managed goodness that also needs learning. Arghhhh
--
Sacha Barber
sacha....@gmail.com

Peter O'Hanlon

unread,
Nov 9, 2009, 5:49:44 AM11/9/09
to wpf-di...@googlegroups.com
Sacha - come over to the dark side - learn Interop; it's not as though you're doing Silverlight;->
--
Peter O'Hanlon

Sacha Barber

unread,
Nov 9, 2009, 6:02:39 AM11/9/09
to wpf-di...@googlegroups.com
Pete
 
I would love to know some Win32 interop stuff, I just don't have clue where to get started, got any good books/resources etc etc
--
Sacha Barber
sacha....@gmail.com

Jeremiah Morrill

unread,
Nov 9, 2009, 6:06:58 AM11/9/09
to wpf-di...@googlegroups.com
Sometimes the best way to learn is to find a problem you can only solve with it...That's what I need to do or I get disinterested and take a nap.

Sacha Barber

unread,
Nov 9, 2009, 6:54:29 AM11/9/09
to wpf-di...@googlegroups.com
I hear you, only thing is since I know none of it, I dont know what it can or cant do, and generally I never try and think up things I can not solve.
--
Sacha Barber
sacha....@gmail.com

Peter O'Hanlon

unread,
Nov 9, 2009, 6:57:37 AM11/9/09
to wpf-di...@googlegroups.com
One of the best places to get started is http://pinvoke.net/.
--
Peter O'Hanlon

Jeremiah Morrill

unread,
Nov 9, 2009, 7:26:40 AM11/9/09
to wpf-di...@googlegroups.com
I see from your codeproject articles that you are not giving yourself enough credit =P

The problem of not knowing what you can or can't isn't a interop only issue, but an issue with not being able to memorize MSDN.  Always assume you can do anything, and don't stop until you hit pay-dirt, or a closed subsystem (or violate your EULA).  Even if you attempts are worthy of failblog, you'll have learned new things that will be invaluable to you later.

Did I just give an interop pep talk?

-Jer

Sacha Barber

unread,
Nov 9, 2009, 7:51:11 AM11/9/09
to wpf-di...@googlegroups.com
Yep, Its all good. One day Jer one day.
--
Sacha Barber
sacha....@gmail.com

Peter O'Hanlon

unread,
Nov 9, 2009, 7:52:47 AM11/9/09
to wpf-di...@googlegroups.com
If you like mate, I can send you the interop that I'm currently working on for working with the Kernel Transaction Manager.
--
Peter O'Hanlon

Sacha Barber

unread,
Nov 9, 2009, 7:53:14 AM11/9/09
to wpf-di...@googlegroups.com
Yeah go on then.
--
Sacha Barber
sacha....@gmail.com

Peter O'Hanlon

unread,
Nov 9, 2009, 9:44:49 AM11/9/09
to wpf-di...@googlegroups.com
Here you go - the Kernel Transaction Manager stuff that's going to be part of Goldlight.
 
Pete

--
Peter O'Hanlon
Goldlight.MVVM.Infrastructure.zip

Sacha Barber

unread,
Nov 9, 2009, 9:46:18 AM11/9/09
to wpf-di...@googlegroups.com
Thanks Pete, Ill have a look into this.
--
Sacha Barber
sacha....@gmail.com

Sacha Barber

unread,
Nov 9, 2009, 10:21:29 AM11/9/09
to wpf-di...@googlegroups.com
Looks cool,
 
I guess a lot of this is from P/Invoke right?

--
Sacha Barber
sacha....@gmail.com

David Anson

unread,
Nov 9, 2009, 2:16:10 PM11/9/09
to wpf-di...@googlegroups.com

Most of the time when I go there, the definition I want is either missing or wrong. :( For the sake of learning/inspiration, writing your own definitions is also a good exercise in understanding P/Invoke and what's going on under the covers.

Sacha Barber

unread,
Nov 9, 2009, 2:36:15 PM11/9/09
to wpf-di...@googlegroups.com
Fair enough, Ill try it out sometime for sure.
--
Sacha Barber
sacha....@gmail.com

Peter O'Hanlon

unread,
Nov 9, 2009, 2:36:32 PM11/9/09
to wpf-di...@googlegroups.com
I've not really had much problems with it - then again, I tend to just translate them myself (it's the benefit of coming from a straight C SDK background).

On Mon, Nov 9, 2009 at 7:16 PM, David Anson <davi...@microsoft.com> wrote:



--
Peter O'Hanlon

Sacha Barber

unread,
Nov 9, 2009, 2:39:07 PM11/9/09
to wpf-di...@googlegroups.com
yeah I came from VB and Java
--
Sacha Barber
sacha....@gmail.com

Peter O'Hanlon

unread,
Nov 9, 2009, 2:50:39 PM11/9/09
to wpf-di...@googlegroups.com
You have my sympathies.
--
Peter O'Hanlon

Eric Burke

unread,
Nov 9, 2009, 8:21:28 PM11/9/09
to wpf-di...@googlegroups.com

Sacha Barber

unread,
Nov 10, 2009, 3:47:15 AM11/10/09
to wpf-di...@googlegroups.com
Cool
--
Sacha Barber
sacha....@gmail.com
Reply all
Reply to author
Forward
0 new messages