WP7:关于触控手势的问题 [英] WP7: Questions regarding Touch Gestures

查看:27
本文介绍了WP7:关于触控手势的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用适用于 Windows Phone 7 的 Silverlight 工具包 (http://silverlight.codeplex.com/).我想做的是检查文本块上的轻弹.向上滑动时我想增加一个值,向下滑动时我想减少相同的值.

I am using the Silverlight Toolkit for Windows Phone 7 (http://silverlight.codeplex.com/). What I would like to do is check for a flick on a text block. On a flick up I want to increment a value and on a flick down I want to decrement the same value.

推荐答案

<TextBlock Text="0">
    <toolkit:GestureService.GestureListener>
        <toolkit:GestureListener Flick="GestureListener_Flick" />
    </toolkit:GestureService.GestureListener>
</TextBlock>

private void GestureListener_Flick(object sender, FlickGestureEventArgs e)
{
    //use e.Direction to determine which way
}

这篇关于WP7:关于触控手势的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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