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

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

问题描述

我的 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.

然后我想将用户控件(我页面上的一个小 UI 部分)上的轻弹手势用于其他操作.

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 控件中使用带有轻弹手势的子控件?

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 在 Pivot 控件中切换开关?

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

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

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