首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

wpf解决思路

2013-08-06 
wpfwpf怎么根据窗口句柄获取窗口(类似于winform的windowformhost)WPFWinForm[解决办法]WPF获取窗口句柄201

wpf
wpf怎么根据窗口句柄获取窗口(类似于winform的windowformhost) WPF WinForm
[解决办法]
WPF获取窗口句柄
2011-04-06 09:40 by 翟士丹 Stan Zhai, 209 阅读, 0 评论, 收藏, 编辑
.NET WinForm获取窗口句柄很方便,this.Handle搞定。

WPF就有些麻烦了,获取方法如下:

引入命名空间:using System.Windows.Interop;

获取方法:new WindowInteropHelper(this).Handle

this是个Window类的实例
[解决办法]
详细信息看这个介绍:http://www.cnblogs.com/jasondan/archive/2011/04/06/2095984.html

热点排行