views:

27

answers:

1

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.

A: 

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?

Josh Einstein
Hi JoshThe ActiveX control that i am talking about is a proprietary control from a company and is used to display live streaming video on the activex.
deepak
Thansk for the reply. Is there any possibility to use .xbap application to display the video streaming activex control may be using windowformhost control. The activex is very similar in functionality to the VLC activex control.
deepak
If you go down the path of using a WPF in-browser application you'll find you have a lot more options. But it still suffers from many of the same limitations with regards to how the ActiveX control isn't really part of the WPF/Silverlight "airspace". I would recommend re-thinking your approach and see if maybe you can design the page so that the ActiveX control is hosted in the HTML directly and the Silverlight control(s) appear around it.
Josh Einstein