摘要: Window.GetWindow(【Visual】) 静态方法可以获得任意组件的顶层窗口。 阅读全文
posted @ 2013-01-30 15:28 fff8965 阅读(561) 评论(0) 推荐(0) 编辑
摘要: window = Window.GetWindow(【Visual】);Point offset = 【Visual】.TransformToAncestor(window).Transform(new Point(0, 0))上面代码可以获得任意组件的窗口坐标。获取鼠标相对于任意组件的位置用Mouse.GetPosition(IInputElement relativeTo)或MouseEventArgs.GetPosition(IInputElement relativeTo)获取屏幕鼠标位置用win32apiusing System;using System.Collections.Ge 阅读全文
posted @ 2013-01-30 15:27 fff8965 阅读(1380) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using Syste... 阅读全文
posted @ 2013-01-30 09:56 fff8965 阅读(504) 评论(0) 推荐(0) 编辑