其他分享
首页 > 其他分享> > [WPF]鼠标位置捕捉

[WPF]鼠标位置捕捉

作者:互联网

private void StackPanel_MouseMove(object sender, MouseEventArgs e) {     Debug.WriteLine("Move");       Point spRel = e.GetPosition((IInputElement)e.OriginalSource);     Debug.WriteLine("* StackPanel: ({0},{1})", spRel.X, spRel.Y);       Point winRel = e.GetPosition(this);     Debug.WriteLine("* Window:     ({0},{1})", winRel.X, winRel.Y); }

标签:鼠标,Point,StackPanel,winRel,spRel,捕捉,WriteLine,Debug,WPF
来源: https://www.cnblogs.com/nocanstillbb/p/11245363.html