Can i use Activex with silverlight4?

穿精又带淫゛_ 提交于 2019-12-12 14:12:30

问题


I need to use a ActiveX control in my silverlight application. After some research i found out a few ways in which a silverlight app can use ActiveX control

Use ActiveX control in a webpage along with silverlight plugin and use javascript for interaction between silverlight and activex.

Use a webbrowser control in silverlight 4 and load the webpage containing activex in webbrowser control.

Is there any other way that can utilized to embed activex control in silverlight app. I read somewhere that silverlight 4 has support for COM components. Can silverlight4 provide support for embedding activex control in a silverlight app.

Any help on this is highly appreciated and if some samples/documentation link is there that would be great.

Thanks in advance.


回答1:


Silverlight does have support for COM automation servers like those used with Microsoft Office. It doesn't have general support for COM though and even if it did, ActiveX controls have very specific hosting requirements.

The idea of using the browser control is a possibility, but it will introduce some significant limitations. For one, you cant use the WebBrowser control in Silverlight unless you're running in out-of-browser mode which means your users would have to take steps to install the Silverlight application.

Additionally, the WebBrowser control (including any ActiveX controls it contains) will always render above your Silverlight content and won't be able to participate in transforms, animations, styling, etc. In other words it will stick out like a sore thumb.

What kind of control is it? Perhaps there is an alternative?



来源:https://stackoverflow.com/questions/3965613/can-i-use-activex-with-silverlight4

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