views:

1943

answers:

2

Is it possible to host Silverlight in the Windows.Forms without the WebBrowser control to avoid unnecessary COM marshaling?

EDIT: The goal is to use a rich graphic content like WPF or Silverlight on older platforms like Windows 2000.

+2  A: 

Although it may be possible to hack a solution together that doesn't use IE as a host for Silverlight content, it would not be supported by Microsoft (and thus you may run into design and stability issues). Your best bet would be to use the browser as a direct host and try to minimize the number of instances you're using (to limit the amount of memory used by hosting Internet Explorer instances).

You mentioned WPF -- the necessary platform pieces are not available on Windows 2000 to support WPF.

After a short (and failed) experiement to host Silverlight content directly on a WinForm, it's clear that it was't designed for this scenario. You can try adding the control to WinForm (just add it as a COM reference in the controls, it's called "Microsoft Silverlight"). It sites correctly as a control, but setting the source URL isn't sufficient, and there aren't obvious methods to make it "go". It doesn't download, nor paint correctly.

+4  A: 

All the available options to host Silverlight on a host like windows application are listed below:

Msdn Documentation

Rahul Gangwar
Technical Consultant
Microsoft

The documentation contains a link to the Silverlight Alternative Hosting http://code.msdn.microsoft.com/silverlightalthost. So it is possible to host Silverlight for example within another Web plug-in or within a Win32 application.
Shurup