如何在c#WPF中获得鼠标poisition [英] how to get mouse poisition in c# WPF

查看:147
本文介绍了如何在c#WPF中获得鼠标poisition的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我使用了一个列表框项目绑定值,还有一个弹出框来绑定选定的列表框项目。

每当我必须选择列表框项目时,这些值将绑定到弹出窗口中,并且它也能正常工作。

实际上我的要求是在弹出窗口中显示当前所选项目的一个多边形点。 />
如果我选择第一个项目意味着多边形将放在第一位。

多边形将移动到相应的选定列表框项目。我用Google搜索了这个要求。但我找不到确切的解决方案。

任何人都可以建议我解决这个问题。





提前致谢。



问候,

Arunkumar M

Hi Everyone,

I have used one listbox items binded values and also having one popup to bind the selected listbox items.
Whenever i have to select the listbox items the values will binded into popup window and also it works fine.
Actually my requirement is to get show the one polygon point in popup window for current selected item.
if i select first item means the polygon will place first place.
The polygon will move to the corresponding selected listbox items. I googled for this requirements. But i couldn't find the exact solution.
Can anyone please suggest me the solution regarding this.


Thanks in advance.

Regards,
Arunkumar M

推荐答案

通常你不需要在低级别这样做。 WPF具有命中测试的概念:

http://msdn.microsoft.com/en-us/library/ms752097%28v=vs.110%29.aspx [ ^ ],

< a href =http://msdn.microsoft.com/en-us/library/ms608753%28v=vs.110%29.aspx> http://msdn.microsoft.com/en-us/library/ms608753 %28v = vs.110%29.aspx [ ^ ]。



-SA
Usually you don't need to do this at low level. WPF has the concept of hit testing:
http://msdn.microsoft.com/en-us/library/ms752097%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/ms608753%28v=vs.110%29.aspx[^].

—SA


这篇关于如何在c#WPF中获得鼠标poisition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆