Host Silverlight in the Windows.Forms without the WebBrowser control

痴心易碎 提交于 2019-11-30 19:21:48

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

Msdn Documentation

Rahul Gangwar
Technical Consultant
Microsoft

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!