如何停止WP7枢轴控件来处理Silverlight Toolkit中的Flick Gesture事件 [英] How to stop the WP7 pivot control handling the Flick Gesture event in Silverlight Toolkit
问题描述
我的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上的Flick Gesture(页面上的一个小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数据透视控件中使用带有轻拂手势的子控件?
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.
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屋!