功能实现主要分三步:
1、添加两个引用:WindowsFormsIntegration.dll(负责整合WPF和Windows)、System.Windows.Forms.
2、在 XAML文件中添加两个引用(粗体部分):
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![(转)如何在WPF中调用Winform控件 (转)如何在WPF中调用Winform控件](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
3、在XAML编码区实现你想添加的控件:
原文添加的是DataGridView控<wfi:WindowsFormsHost>
<wf:DataGridView x:Name="Dg" Dock="Fill" SelectionMode="FullRowSelect">
</wf:DataGridView>
</wfi:WindowsFormsHost>件:
<wf:DataGridView x:Name="Dg" Dock="Fill" SelectionMode="FullRowSelect">
</wf:DataGridView>
</wfi:WindowsFormsHost>件: