1. 程式人生 > >WPF中載入System.Windows.Forms;

WPF中載入System.Windows.Forms;

工程中需要用到定時器Timer

其標頭檔案為System.Windows.Forms;

直接加上using System.Windows.Forms; 該標頭檔案不識別;

需要在工程中新增引用:

程式集中選擇下兩項

[WindowsFormsIntegration]和[System.Windows.Forms]

點選確定即可;