Hosting Windows Forms UserControl into Silverlight

2019-01-29 07:08发布

I've a DLL written in Windows Forms. I need to host one UserControl from this DLL to my silverlight project. Is this possible?

In WPF, this is possible using WindowsFormsHost :

<WindowsFormsHost Name="m_WindowsFormsHost" Height="800" Width="900" >
            <winform:PlayerWindowControl />
</WindowsFormsHost>

I want to do this in silverlight.

2条回答
爷、活的狠高调
2楼-- · 2019-01-29 07:15

There is no similar support, nor does it seem likely any would be added, as Silverlight tries to be cross-platform. If you want this feature, then you should also have no problems being tied to Windows by using WPF, right?

查看更多
等我变得足够好
3楼-- · 2019-01-29 07:28

You can't use DLLs, not written for Silverlight.
Take a look to this post.

查看更多
登录 后发表回答