添加引用
这时候添加一个winform 窗体 拖个控件过来
这时就添加上“AxInterop.MSTSCLib”了
1、引入
System.Windows.Forms.dll
WindowsFormsIntegration.dll
2、在xaml中加入命名空间
xmlns:wfi =“clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration”
xmlns:wf =“clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms”
xmlns:ax=“clr-namespace:AxMSTSCLib;assembly=AxMSTSCLib”
3、xaml界面加入控件
<Grid>
<wfi:WindowsFormsHost>
<ax