WPF 和 WinForms 可以在应用程序中混合使用吗? [英] Can WPF and WinForms be mixed within an application?

查看:27
本文介绍了WPF 和 WinForms 可以在应用程序中混合使用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WPF 和 Windows 窗体控件可以在一个应用程序中使用吗?这是一个多么困难或实际的想法?

Can both WPF and Windows forms controls be used within one application? How difficult or practical an idea is this?

推荐答案

我相信有一个 WindowsFormsHost 控件可以放在你的 WPF 应用程序中,它可以与 WinForms 代码进行互操作:

I believe there is a WindowsFormsHost control you can put in your WPF apps which will do interop back to WinForms code:

http://blogs.msdn.com/ivo_manolov/archive/2007/07/26/wpf-win32-interop-part-1-hosting-winforms-controls-in-wpf-windows.aspx

这篇关于WPF 和 WinForms 可以在应用程序中混合使用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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