Hosting Silverlight outside the browser (sourcecode)

Over half a year ago I blogged about a solution for hosting a Silverlight plugin outside the browser. This is not about the SL3 out-of-browser feature. This is a solution where the Silverlight plugin is hosted directly in your WinForm application without the need for a browser control. The demonstrated prototype included an implementation for Silverlight COM interfaces entirely written in C#. The prototype worked nicely and then nothing happened.

Fast forward 7 months; after reading Scott Hanselman's post on '32 Ways to Keep Your Blog from Sucking' I have decided to obey Hanselman's law #16: 'Have a Code Garage Sale'. It basically states that if you have code lying around and nothing happens with it, publish it.

So there you have it; the source code of a prototype Silverlight host that does not require a browser. The host is capable of displaying both single XAML pages and entire XAP packages, the included TestApp demonstrates both.

Please be aware that this is just a prototype; certain things just don't work. For example; you won't be able to type any text in a textbox in the XAML page example. There's probably a lot more to fix, but the source code should get you started. I am not available for any kind of support. You can try, but I'm probably too busy with other projects.

Download: AgHost source code.

 

 

 

Published: October 12, 2009

2 Comments

  1. Michael Washington said: says:

    Wow thanks!

  2. Casper van Dijk said: says:

    Thanks for sharing that.. such code might create a whole new generation of 'Inside Ole' fans.

 

Leave a comment

Comments are closed for this post