1.导包
在引用处添加System.Windows.Fotms和WindowsFormslntegration
2.xaml部分
在需要使用控件的页面添加引用
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:wfi ="clrnamespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
添加需要使用的winfrom控件
<wfi:WindowsFormsHost Width="180" Height="20">
<wf:DateTimePicker Format="Custom" CustomFormat="yyyy/MM/dd HH:mm:ss"/>
</wfi:WindowsFormsHost>
标签:控件,Windows,winfrom,System,Forms,添加,WPF From: https://www.cnblogs.com/lzjsky/p/17087697.html