1、首先去创建Windows Form Application项目

2、添加两个引用:WindowsFormsIntegration.dll(负责整合WPF和Windows)、System.Windows.Forms.

3、XAML文件中添加两个引用方法代码

4、添加HOST宿主方法代码

5、在MainWindow.xaml.cs中添加的方法代码

时间:2024-11-04 19:37:57
1、首先去创建Windows Form Application项目

2、添加两个引用:WindowsFormsIntegration.dll(负责整合WPF和Windows)、System.Windows.Forms.

3、XAML文件中添加两个引用方法代码

4、添加HOST宿主方法代码

5、在MainWindow.xaml.cs中添加的方法代码
