获取WPF控件句柄的方法

using System.Windows.Interop; 

//使用WindowInteropHelper类可以获得窗体句柄 

int handle = new WindowInteropHelper(this).Handle.ToInt32();

原文地址:https://www.cnblogs.com/xiaoko/p/1781699.html