如何在Windows Phone 7中实现鼠标按下和鼠标移动事件? [英] how to implement mouse down and mouse up events in windows phone 7?
本文介绍了如何在Windows Phone 7中实现鼠标按下和鼠标移动事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
先生,我正在开发一个Windows Phone 7应用程序,我想要实现一个长按按钮。因此,当按下按钮时,它会持续执行特定任务,直到它没有被释放。为此,我需要知道如何实现鼠标按下和
鼠标注册事件。
sir, i am developing a windows phone 7 app in which i want to implement a long press buttons. So that when button is pressed it continuously perform a specfic task until it is not released. For this purpose i need to know how to implement mouse down and mouse up events.
谢谢
推荐答案
你必须使用
MouseLeftButtonDown 事件和
MouseLeftButtonUp 活动。
you have to use the
MouseLeftButtonDown event and the
MouseLeftButtonUp event.
<uiElement MouseLeftButtonDown="mouseDownHandler"
MouseLeftButtonUp="mouseUpHandler">
</uiElement>
private void mouseDownHandler(object sender, MouseButtonEventArgs e)
{
// ...
}
private void mouseUpHandler(object sender, MouseButtonEventArgs e)
{
// ...
}
这篇关于如何在Windows Phone 7中实现鼠标按下和鼠标移动事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文