Tuesday, January 15, 2008 5:37 AM
Is there news concerning hosting Silverlight 2.0 controls in a rich client application (WPF/Winforms) ? The last information that I found is that Silverlight is only supported in the web browser (from Zhenlan Wang, 05-08-2007, http://silverlight.net/forums/t/845.aspx) but maybe there is something in the pipeline for the beta release that allows this ?
As a background : We have an internally developed graph control that we would like to migrate from ActiveX and VB6 to Silverlight 2.0 and C# but we would also like to keep on using it in thin and rich client applications.
Tuesday, January 15, 2008 1:20 PM
Why not just host the WebBrowser on WPF and WinForms to show the control? The reality is that Silverlight must live on a web page so hosting it in a WebBrowser is required. (e.g. Try the Frame class in WPF, or hte WebBrowser control in WinForms).
Wednesday, January 16, 2008 2:39 AM
A requirement in our situation is that the SL control would also interact with the host application (through properties, methods and events). I guess it is possible to create a communication channel between the SL control hosted inside a Winforms WebBrowser control and the host application (by using window.external) but that would be a complicated solution.
I was wondering whether Microsoft would provide a Winforms/WPF ‘SilverlightHost’ control that would make this scenario much simpler.
Thanks for the feedback,
Thursday, January 17, 2008 3:40 AM
Unfortunately what you’re seeking is not supported. But since you’re using WPF to create the hosting application, can you keep your solution all WPF? WPF provides almost all features Silverlight has. So I think you don’t need to create a separate Silverlight application unless you want cross platform support. But if you need cross platform, you can’t use WPF as the hosting application.
Thursday, January 17, 2008 5:17 AM
Thanks for the info Yi-Lun !
So we’ll go for the Silverlight control and we’ll support rich client application by using the WebBrowser control in WinForms (and the Frame class in WPF, currently we don’t have customers yet with WPF) where the host application communicates with the control through window.external. We will have to write some boilerplate code to implement this but it will still be less work than having to write and support a WPF control next to the Silverlight control.
Monday, March 03, 2008 12:23 PM
Here's something interesting that popped up last week:
Essentially Microsoft is hosting a Silverlight control inside a toolbar. I'm not certain if they're using the WebBrowser ActiveX component to make it work.
Anyway, this got me thinking how it would be possible as well.
Tuesday, March 04, 2008 11:51 AM
Seems that Microsoft is going to use Silverlight in their own software. With the MSN toolbar I guess that because the host is Internet Explorer they don’t need the WebBrowser ActiveX control to pull this off...
Thanks for the info,