对于此作业,您必须将此引用添加到Win-Form项目:
> PresentationCore
> PresentationFramework
> WindowsBase
> System.Xaml@H_404_2@
要在WinForm或win32应用程序中托管WPF窗口,您需要在此之前使用此行.显示()您的Wpf窗口:@H_404_2@
System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(myWpfWindow);
见http://msdn.microsoft.com/en-us/library/aa348549.aspx@H_404_2@
有用的链接:Mixing WPF and WinForms@H_404_2@