WPF 中可以设置鼠标监听器吗?
我可以在 WPF 中设置鼠标监听器(单击)吗?
Can i set a mouselistener (Clicked) in WPF?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我可以在 WPF 中设置鼠标监听器(单击)吗?
Can i set a mouselistener (Clicked) in WPF?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
简单,
您的 xaml 中,
在您的 xaml.cs 中,
有大量可用的鼠标事件。检查 MSDN 中的WPF 支持的鼠标事件列表< /a>
Simple,
In your xaml,
In your xaml.cs,
There are loads of mouse events available. Check MSDN for the list of mouse events supported in WPF
如果用户点击了哪里?
如果你有一个按钮(或窗口或几乎任何其他东西),你只需添加 MouseDown() 事件处理程序......
If te user clicked where?
If you have a button(or window or pretty much anything else) you simpy add the MouseDown() eventhandler....