当前位置: 代码迷 >> 综合 >> VS2017 WPF 中使用WinForm控件方法
  详细解决方案

VS2017 WPF 中使用WinForm控件方法

热度:86   发布时间:2023-12-21 05:56:12.0

添加引用System.Windows.Forms

在XAML中加入命名空间

xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"

然后就可以直接写了,如

<forms:StatusBarPanel></forms:StatusBarPanel>

VS2017打控件名字时会有智能提示,注意,并不是所有WinForm控件都能用,还是有一部分控件依然打不出来,想用的话只能在后台代码区打了

 

  相关解决方案