UPDATE 3: YouCube 3.0 (based on Google Chromium) right here.
UPDATE 2: Now interactive! See here for details.
UPDATE: Added a directional light, specular highlight and trackball / mouse control… Just because I could
As you know, .NET 3.5 SP1 includes a WebBrowser control. The current implementation is just a wrapper around the MSHTML ActiveX control, which unfortunately prevents you from doing crazy things to it through WPF.
The ActiveX control itself can be queried for the IViewObject interface and have its Draw method called. The WPF WebBrowser doesn’t expose this directly, but fortunately the Windows Forms WebBrowser does (alternatively you could host MSHTML directly).
All that remains is to get the image into a WriteableBitmap… Then the fun can begin
:
You can try the result here (ClickOnce application). The source code is available here. Note the browser isn’t interactive [yet]
…

14 responses so far ↓
Arnoud // September 4, 2008 at 2:04 am |
Very nice, if you could make this interactive you would be my personal hero
Jeremiah Morrill // September 4, 2008 at 9:41 am |
Great work! I can’t wait to see more!
This reminds me of my very, very old project on codeplex to render any Win32 control to WPF and keep them interactive (http://codeplex.com/WPFWin32Renderer). It works fairly well (you can watch youtube videos with it), but the performance wasn’t all there. I’ve been wanting to update to to support the new WriteableBitmap or even my VRE project which is a super-fast WriteableBitmap (http://codeplex.com/VideoRendererElement), but I just can’t find the energy to pick it back up again
-Jer
Chris Cavanagh // September 4, 2008 at 9:46 am |
Jer – Wish I’d found your project sooner! (although I obviously didn’t spend much time on it
). I’ll take a closer look at it; the interactivity sounds sweet
Chris Cavanagh // September 4, 2008 at 9:47 am |
Arnoud – Check out Jer’s project on Codeplex! (mentioned in other comment). It looks pretty awesome
Frank La Vigne // September 4, 2008 at 11:41 am |
This would make for a great screen saver
Michael Washington // September 4, 2008 at 1:16 pm |
Very nice. Also shows how Click Once works nicely. I may have to start considering it more.
Chris Cavanagh // September 4, 2008 at 1:29 pm |
Michael – I agree on ClickOnce
It’s a breeze to set up too; I’ve updated some older demos & apps to use it: http://chriscavanagh.wordpress.com/2008/09/04/demos-clickonce-deployment/
Silverlight Cream for September 04, 2008 -- #361 // September 5, 2008 at 6:06 am |
[...] a couple author names this morning, but they’re correct on this post. From SilverlightCream.com: WPF 3D web browser Note this is WPF, but it is definitely interesting… I didn’t have a chance to download this before [...]
YouCube - 3D Web browser // September 15, 2008 at 7:40 am |
[...] Очень интерестный пример применения WPF на сайте http://chriscavanagh.wordpress.com/2008/09/04/youcube/ [...]
Francis // September 15, 2008 at 11:07 am |
Hello Chris, very nice piece of work indeed
.
It is great to see its performance too. However, i was trying to use the url trick ( “/v/”) to make the video fullscreen and but it didn’t work.
WARLOCKMAN // April 11, 2009 at 10:15 am |
Вот это да! Занятный поворот событий!
A web browser suitable for Harry Potter in WPF! « Robotic Pandas // July 26, 2009 at 8:01 pm |
[...] Li SiYu, and a former intern Wang Chao who worked on the browser part) started with code from Chris Cavanagh’s Blog to render a background IE instance into a WPF writeable bitmap, which we optimized using some [...]
Tune Up Your PC » Post Topic » A web browser suitable for Harry Potter in WPF! // July 26, 2009 at 11:11 pm |
[...] Li SiYu, and a former intern Wang Chao who worked on the browser part) started with code from Chris Cavanagh’s Blog to render a background IE instance into a WPF writeable bitmap, which we optimized using some [...]
WPF 3D Chromium Browser « Chris Cavanagh’s Blog // August 27, 2009 at 1:47 am |
[...] 27, 2009 · Leave a Comment There’s an updated version of YouCube (WPF 3D Web Browser) available based on my Awesomium / Chromium control. Try it [...]