如何停止 WP7 枢轴控件处理 Silverlight Toolkit 中的 Flick Gesture 事件 [英] How to stop the WP7 pivot control handling the Flick Gesture event in Silverlight Toolkit

查看:21
本文介绍了如何停止 WP7 枢轴控件处理 Silverlight Toolkit 中的 Flick Gesture 事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 WP7 应用程序中有一个枢轴控件,它本质上响应左右滑动以在枢轴项之间移动.

I have a Pivot Control in my WP7 app that by nature responds to left and right swipes to move between the pivot items.

然后我想在 UserControl(我页面上的一个小的 UI 部分)上使用 Flick Gesture 做其他事情.

I then want to use the Flick Gesture on a UserControl (a small UI segment on my page) for something else.

我的用户控件确实处理该事件,但 Pivot 控件也是如此,因此它导航到下一项.我还没有想出如何在用户控件处理它时停止该事件.

My user control does handle the event but so does the Pivot control, so it navigates to the next item. I have not figured out how to stop the event when the usercontrol handles it.

是否可以在 WP7 Pivot Control 中使用带有轻弹手势的子控件?

Is it possible to use a sub control with the flick gesture within a WP7 Pivot Control?

例如:

        private void glBlinds_Flick(object sender, FlickGestureEventArgs e)
        {
                //do stuff
                e.Handled = true;
        }

推荐答案

简短的回答是不要将支持手势的控件放在也支持相同手势的另一个控件之上.

The short answer is don't put a control which supports a gesture on top of another control which also supports the same gesture.

请参阅对一个非常相似的问题的回答,以获得稍长的回复:WP7 在枢轴控件中切换开关?

Please see this answer to a very similar question for a slightly longer response: WP7 Toggle switch in a Pivot control?

这篇关于如何停止 WP7 枢轴控件处理 Silverlight Toolkit 中的 Flick Gesture 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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