我可以将Activex与silverlight4一起使用吗? [英] Can i use Activex with silverlight4?

查看:106
本文介绍了我可以将Activex与silverlight4一起使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Silverlight应用程序中使用ActiveX控件。经过一些研究,我发现了Silverlight应用程序可以使用ActiveX控件的几种方式



在网页中将ActiveX控件与Silverlight插件一起使用,并使用JavaScript在Silverlight之间进行交互



在silverlight 4中使用Webbrowser控件,并在webbrowser控件中加载包含activex的网页。



是否有其他方法可以将ActiveX控件嵌入Silverlight应用程序。我在某处读到Silverlight 4支持COM组件。 silverlight4可以为在ActiveX控件中嵌入Activex控件提供支持吗。



任何对此的帮助都将受到高度赞赏,如果有一些示例/文档链接会很好。 / p>

预先感谢。

解决方案

Silverlight确实支持COM自动化服务器,例如与Microsoft Office一起使用的服务器。尽管它没有对COM的一般支持,但是即使有,ActiveX控件也有非常特定的托管要求。



使用浏览器控件的想法是有可能的,但这会带来一些重大限制。例如,除非您以浏览器外模式运行,否则您不能在Silverlight中使用WebBrowser控件,这意味着您的用户将必须采取步骤来安装Silverlight应用程序。



此外,WebBrowser控件(包括它包含的任何ActiveX控件)将始终在您的Silverlight内容之上呈现,并且将无法参与变换,动画,样式等。换句话说,它将像疮一样突出拇指。



这是一种什么样的控制?也许还有其他选择?


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.

解决方案

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?

这篇关于我可以将Activex与silverlight4一起使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆