获取WPF控件句柄的方法
using System.Windows.Interop;
//使用WindowInteropHelper类可以获得窗体句柄
int handle = new WindowInteropHelper(this).Handle.ToInt32();
using System.Windows.Interop;
//使用WindowInteropHelper类可以获得窗体句柄
int handle = new WindowInteropHelper(this).Handle.ToInt32();