在wpf程序中添加window的程序集引用:System.Windows.Forms.dll和WindowsFormsIntegration.dll
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:winForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
<wfi:WindowsFormsHost> <winForms:XX>...</winForms:XX> </wfi:WindowsFormsHost>
WindowsFormsHost:允许在WPF中承载WINFORM控件的元素。