将Windows Forms UserControl托管到Silverlight应用程序中 [英] Hosting Windows Forms UserControl into Silverlight application
本文介绍了将Windows Forms UserControl托管到Silverlight应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个用Windows窗体编写的DLL.我需要从该DLL托管一个UserControl到我的silverlight项目.这可能吗?
I've a DLL written in Windows Forms. I need to host one UserControl from this DLL to my silverlight project. Is this possible?
在WPF中,可以使用 WindowsFormsHost :
In WPF, this is possible using WindowsFormsHost :
<WindowsFormsHost Name="m_WindowsFormsHost" Height="800" Width="900" >
<winform:PlayerWindowControl />
</WindowsFormsHost>
我想在Silverlight中做到这一点.
I want to do this in silverlight.
推荐答案
由于Silverlight试图实现跨平台,因此没有类似的支持,也似乎不会添加任何支持.如果您想要此功能,那么使用WPF与Windows绑定也应该没有问题,对吧?
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?
这篇关于将Windows Forms UserControl托管到Silverlight应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文