将 Windows 窗体 UserControl 托管到 Silverlight 应用程序中 [英] Hosting Windows Forms UserControl into Silverlight application

查看:16
本文介绍了将 Windows 窗体 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 窗体 UserControl 托管到 Silverlight 应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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