一.WPF 中获取和设置鼠标位置 方法一:WPF方法 Point p = Mouse.GetPosition(e.Source as FrameworkElement); Point p = (e.Source as FrameworkElement).PointToScreen(pp); 方法二: API方法 /// <summary> /// 设置鼠标的坐标 /// </summary> /// <param name="x">横坐标</p
一.WPF 中获取和设置鼠标位置 方法一:WPF方法 Point p = Mouse.GetPosition(e.Source as FrameworkElement); Point p = (e.Source as FrameworkElement).PointToScreen(pp); 方法二: API方法 /// <summary> /// 设置鼠标的坐标 /// </summary> /// <param name="x">横坐标</p